H
H
hipa2021-10-31 15:53:13
C++ / C#
hipa, 2021-10-31 15:53:13

How to rotate an object relative to a point in space?

The way I found is RotateAround(), but it doesn't work for me.

The idea is that there is a cube that moves by rolling from edge to edge. To do this, I want to rotate it about a point in space that will respond outside of this cube.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BFGunner, 2021-11-03
@BFGunner

And why is RotateAround not suitable? Difficult or lazy?
1. Flip not relative to a point, but relative to the axis of the face.
2. The first argument to RotateAround is the center around which the rotation occurs. Take a point on the edge.
3. The second argument is the axis of rotation. Calculate the face vector of the cube. Around this axis and rotate
Connect knowledge in trigonometry to derive formulas. I'm not a master either. but calculate a point on a face. when it is known that this is a cube and its side, this is a simple task.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question