V
V
Vlad1222021-06-10 18:30:32
C++ / C#
Vlad122, 2021-06-10 18:30:32

What is transform.right and .up?

I was looking for how to make the object rotate in the direction of its movement (during a bounce).
There was this line: transform.right = rb.velocity.normalized;
I searched the Internet for what exactly transform.right and up do.
But I have not found a direct answer to what exactly they are.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad122, 2021-06-11
@Vlad122

In short, I understood what is meant here (transform.right = rb.velocity.normalized). When transform.right the x -axis is rotated in the direction the object is going, i.e. she just rolls over with him. If we put transform.up, then the y -axis turned in the direction of movement.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question