- Home /
Angle between two vectors rotated by quaternion?
I am using the example code from this post to rotate objects around a sphere..
http://answers.unity3d.com/questions/41050/how-can-i-make-movement-on-a-sphere.html
Essentially the velocity of the objects are stored in a Vector2 and I use the translate function, from the linked post, to update the position.
What I want to achieve would be simple on 2d plane but I'm having difficult getting an angle on a sphere then converting it to a2d velocity i m trying to get the angle that would make it seem like objects are bouncing off of each other, but I'm not sure how to get the angle between the two objects.
I need to find "dir"(direction)..
vel=new Vector2(Mathf.Cos(dir)*4,Mathf.Sin(dir)*4);
speculative comments welcome.
Your answer
Follow this Question
Related Questions
Rotate object to face up from sphere 1 Answer
Changing the forward rotation for LookAt 2 Answers
Rotating sphere with rigidbody attached 1 Answer
Offset raycast by specific amount 1 Answer