Jump to content

Vector question


YouGroove
 Share

Recommended Posts

I have two 3D points in space :

- begin

- end

 

I want to move bullet using collision with PhysicsSetPosition(x,y,z, force) from start 3D position to end 3D position.

And for example moving 0.2 step eahc step with that vector.

 

How to code that with maths ?

Stop toying and make games

Link to comment
Share on other sites

Maybe you have it the wrong way round?

800px-Vector_subtraction.png

In that case every step when you multiply c by step you would have the bullet flying in the wrong direction.

 

if that's not the issue I'm going to need some more details :)

System:

Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...