Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //declare this variable on top
- Vector3 direction;
- //Add this in an input statement inside the update method, like a call for the spacebar.
- //first line calculates the direction from the current camera position and the model position
- direction = myModelPosition - finalCameraPosition;
- //normalize that vector.
- direction.Normalize();
- //Then add this outside any statements in the Update method.
- myModelPosition += direction;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement