Jump to content


- - - - -

moving a 3d object towards another


1 reply to this topic

#1 newInTown

    New Member

  • Members
  • Pip
  • 1 posts

Posted 10 January 2010 - 12:58 PM

Hello everyone, I'm new here and new to game development.
At the moment i'm trying to (re)learn some math related to games and I could use some explanations on how to achieve the following:

Say you have 2 objects in 3d space. Object A is located, for example, at position(300, 100, 300) and object B at position(35, -225, -200). My question is how would make object B move towards object A? Also how would you make object B correctly rotate to object A so that it always faces or looks at object A?

Thanks :)

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 5340 posts
  • LocationSanta Clara, CA

Posted 10 January 2010 - 07:03 PM

Try giving this a readthrough: http://www.devmaster...rs_and_matrices
reedbeta.com - developer blog, OpenGL demos, and other projects





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users