0
I wanted to know a way to rotate the object without turning the canvas inside it. My Spinning code is like this:
void FixedUpdate(){
if(facingRight == false && moveInput > 0)
{
Flip();
}
else if(facingRight == true && moveInput < 0)
{
Flip();
}
}
void Flip(){
facingRight = !facingRight;
Vector3 Scaler = transform.localScale;
Scaler.x *= -1;
transform.localScale = Scaler;
}
Only that way it’s spinning everything inside the player: https://imgur.com/2ju7MyF
My hierarchy: https://imgur.com/a/kA3TuBn
Maybe I can spin each component individually, but I wanted to know if it has a better shape.
Thank you in advance!
Got it, then I’d have to make a code on the canvas to follow the Object or something? How could I do that?
– WillHiro
no, you would move the parent Gameobject and as the canvas is on it, it moves together
– Christian Beregula