In a model with bones, I have to set individual directions of rotation. In the example, the direction of rotation changes, but it automatically rotates around the axis, which should not be. Who knows how to change only the direction of rotation? Thanks
mesh.skeleton.bones[ 1 ].rotation.x -= stream.getValue0() / 1.7;
mesh.skeleton.bones[ 1 ].rotation.y += stream.getValue0() * 1.5;
mesh.skeleton.bones[ 1 ].rotation.z = stream.getValue0();
To keep the same values of rotation, but to literally change direction of rotation, you would point the axis the opposite way. For example, rotation around an axis pointing up (Y axis) will be in the opposite direction as rotation on an axis pointing down, given the same value of rotation.
So if your axis is
[0, 1, 0] then changing it to
[0, -1, 0] will make rotation be the opposite direction. For an axis like
[1, 2, 3], the inverse axis would be
[-1, -2, -3], like @Tom said, with the
You can visualize vectors here: https://academo.org/demos/3d-vector-plotter/
Try inverting them with
- and they will point the opposite way (which makes rotation opposite).
@trusktr Great link, thank you.
Oops, didn’t realize you replied to yourself.