Created
October 25, 2013 10:17
-
-
Save anunyin/7152526 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vec3 object1(15.2f, 0.0f, -12.0f); | |
vec3 object2(0.0f, 0.0f, 0.0f); | |
// Set the forward vector to align with the vector between these two positions. | |
// Effectively having the second object "look at" the first. | |
object2.SetForward(object1 - object2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment