Rotating around object when button clicked
Hello,
I am trying to make a player with a head and feet only. I want the feet to rotate around the pivot point when I click a button, I tried this a couple of times but the feet rotate 360 degrees.
if (Input.GetKeyDown(KeyCode.Space))
{
feet.transform.Rotate(new Vector3(0, 0, -90) * Time.deltaTime);
}
This script did not work as the feet just kept rotating slightly each time I click the button.
Many thanks, any advice would be great. This image shows how I want the object to move. The feet should pivot around the head at 90 degrees, and then return back to ground once I let go of button.
Your answer
Follow this Question
Related Questions
Rotate 2D pivot so that gun points at target. 0 Answers
Stopping 3rd person camera from looking too high or low? 1 Answer
Having trouble animating sine wave out of child objects 0 Answers
game object not rotating on its pivot 1 Answer
Object transform rotation around correct pivot, but wrong pivot after colliding 0 Answers