mm yes I got carried away. Didn't think that LiteC was able to multiply vectors like that and looked depthlessly into cross like a multiplication, just got known about it

. My code has changed a lot since my last post.
I actually have been able to get the calculation right:
[code]var c[3] = {480, 543, 0};
var n[3] = {-1, 0, 0};
var b[3];
//n = vec_normalize(n,1);
// b = 2*|<c,n>|*n + c Bounce vector's formula.
var a;
function main()
{
video_mode = 7;
wait(3);
a = 2*abs(vec_dot(c, n));
vec_set(b, vector(a*n[0], a*n[1],0));
vec_add(b, c);
}
This is giving me right answers. But Placing it into my pong thing, it won't do the same job.
//Collision with walls! ------------------------------------
if (vBall[0] < game_minx){ //Left side of the game area
// b = 2*|<c,n>|*n + c Bounce vector's formula.
//Into Parts:
//a = 2*|c,n|
//we change (0,0,0) to (a*(-1), a*0, 0) with vec_set
//add (480, 543,0) and (-a, 0, 0)
a = 2*abs(vec_dot(vBall, nvec_minx));
vec_set(vBounce, vector(a*nvec_minx[0], a*nvec_minx[1],0));
vec_add(vBall, vBounce);
}
I personally think my movement code for the ball is messing things up, but I can't see any other way of moving my ball...
//Keep the ball moving.
vBall[0] += spd*cosv(ball_dir)*time_step;
vBall[1] += spd*sinv(ball_dir)*time_step;
...to be more precise. I think that bounce vector is right but
I can't make it influence ball's movement.