C++ Directx 11 D3DXVECTOR3 doesn't allow me to devide it

Posted by Miguel P on Game Development See other posts from Game Development or by Miguel P
Published on 2012-10-07T20:41:56Z Indexed on 2012/10/08 3:49 UTC
Read the original article Hit count: 232

Filed under:
|
|

If i have a simple vector3 like this:

D3DXVECTOR3 inversevector = D3DXVECTOR3( (pos+lookat_pos));

It works perfect!

But let's say i wanted to multiply it by:

Speed*(float) timeHandler.GetDelta()

So:

D3DXVECTOR3 inversevector = D3DXVECTOR3( (pos+lookat_pos) * Speed*(float) timeHandler.GetDelta());

Now this fails completely, i've used this snippet before, but for some wierd reason it simply won't work( The vector somehow leads x,y,z to 0 or almost, no idea why).

Do you have any idea why?

© Game Development or respective owner

Related posts about c++

Related posts about vector