Tuesday, October 31, 2017

unity - Make one object rotate to face another object in 2D


In my 2D project, I have an object that is sometimes above or below another object.



Once the primary object comes in close proximity with the secondary object, I want the object to rotate on the z axis so that the front of the primary object is facing the secondary object.


(Here, following Unity's default setup, the z axis is the axis pointing into the screen)




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...