Auto level diving character around only one axis
This is maybe rather simple, but I just can't figure it out. I have a diver character that can swim in any direction. Since this makes the character roll around its center axis I fear the controls get rather confusing after a few moments.
Therefore I wish to auto level the character so that the back is toward the sky and the stomach toward the sea floor after a small time window of zero stick input. But - and here is the problem - I want it to just rotate on one axis (y in my image). I want to maintain the position on the x-axis so the diver remains for example with the head pitched down.
I can't get it to work. A gyroscope rotates on both axis mentioned above so the body pitches forwards or backwards depending on the position relative to the gyro arrow direction. If I turn on Align All Axes things get even worse because then it also rotates on the x-axis.
I hope I have described my issue in a understandable way. Any ideas how this can be achieved?
-
Meant to say that Align All Axes makes it also rotate on the Z-axis, not X
-
A good analogy would be a plane which auto levels so the wing tips are both at the exact same distance from the ground, but without affecting the up/down pitch of the plane.
-
I'm very hyped for this. Any luck with the project?
請登入寫評論。