Hello, I want my character to use “Control Rotation” as seen in the video below. And the plane my character is on may not always be flat. The vehicle it is in has a rotational movement. And I couldn’t find a way to change my camera’s plane of rotation. Can you please help me?
As in the image, the camera is currently moving according to the blue plane. But I want it to move relative to the red plane. For this, I tried to rotate the camera relative to the input, successful in this regard, but I am not sure that this is correct.
I think what you might be after is something called gimbal lock. Check out this video #gimbal #6DoF #quaternion Unreal Engine 4 Tutorial: 6DoF Fixing Gimbal Lock - YouTube
At the very beginning he shows an example of what the result looks like…is that what you’re after?
1 Like
It’s possible. Now I’ve started researching the gimbal lock.
Yes definitely gimbal lock. My knowledge of Quaternion is quite lacking. I need to do a good research and learn and progress on this subject, I am waiting for your help. I’ll let you know when I find an example or a solution.
Yes. We fixed this issue using gimbal lock and quaternion. It required advanced software and massive calculations.
@captainTvZs not sure what exactly the issue is from your video…you are just kind of walking/spinning around in your world I can’t really make sense of what I am supposed to be looking at/what is wrong with your controls. If you have added my C++ code to your project and have been using them to correct gimbal lock and that is working, then I would imagine your issues with camera rotation have to do with how your camera is parented/attached to your player character. They may not be synchronized properly, or attached in a non-ideal manner that is causing divergence between player vectors and camera vectors.
Hello there. I fixed the problem. I found that using “control rotation” doesn’t make much sense at this point. After calculating Quaternion and applying it to my character and camera, I got what I wanted
You calculated your own quaternions? That’s impressive! Like you wrote code for it?