- Home /
How do I make an empty game object rotate towards the mouse?
I have a circular player that launches towards the mouse when I click. I have a rectangle running through the player that rotates towards the mouse with an empty game object on the opposite side. I am trying to use the empty game object to detect if the player can jump or not, depending on if there is ground detected by the empty game object. The rotation of the rectangle and the detection are working fine, but the empty game object is not rotating on the end of the rectangle. I want to know how I would go about making the empty object rotate. For reference, I have the player object, with a nested rectangle object, and the rectangle object has the nested empty game object. I have a script inside of the rectangle object making it rotate towards the mouse, and I am referencing the ground detection in my Player object. If anyone knows how to resolve this issue that would be great!