Trying to create deadspace2 flying, but having axis-related issues

Im trying to recreate deadspace 2s zero g flying controls. you could reorient yourself to any angle, the y axis was up and down and the x axis was left and right as you would expect. I thought it would be simple but I’ll show you what problems Ive run into. I feel like someone with more knowledge could solve this in 2 seconds so here I am.

here was my initial attempt, I wrapped the y axis and didnt actually have to redo the camera controls as they already were. However, when the character/camera is horizontal, the x axis spins the character like a turn table instead of left and right:
8179604--1065251--upload_2022-6-3_17-9-18.png

So I went to try out a technique I used for my climbing controls, where I would lerp between upward controls and sideways controls based on the angle of the character. This didnt work though, I am able to get it x input to rotate correctly on one axis based on where it is in the code, ie xaxis, 0, 0 for one angle, 0,0,xaxis for another. and y works as you would need it to when looking sideways, but the controls dont change when looking up or down which has you spinning like a top yet again, but now with the y axis input. :
8179604--1065248--upload_2022-6-3_17-8-57.png

so I then arrived at trying to use local euler angles, when passing in numbers, it treats it as += as opposed to =, the axis.value has it spinning at any value that isnt zero. So I tried raw input, and it worked, but using raw input is a really undesirable solution as you’ll see in the video. It removes the features of using value as youre supposed to, ie no smoothing, no ability to limit angles, it doesnt take in sensitivity, etc. :
8179604--1065254--upload_2022-6-3_17-13-0.png

I feel like I just lack understanding on rotation and that someone with a greater grasp could solve this in 2 seconds. I would really appreciate help here because I really really dont want to try and frankenstein raw input, I mean the video speaks for itself, its a mess.

I think the solution would just be getting value to work with local angles. It makes sense that local angles have the controls consistent, but like I said, it doesnt want to take in axis.value

Some of the CM camera components (e.g. composer) suffer from gimbal lock when the X rotation is ±90 degrees. A simple way around that is to use the CMBrain’s WorldUp override. If you set this to be your player character, then CM’s concept of Up will travel with the player, and gimbal lock shouldn’t be a problem. Have a look at the SphericalSurfaceFollow scene in the CM samples.

thanks for the reply! I figured it was gimbal lock, I had experienced that it a hover racer project. Unfortunately setting world up in the cameras brain didnt change anything? maybe because its moving relative to camlookat? heres the set up
8179679--1065263--upload_2022-6-3_18-4-27.png
putting camlookat in the brain didnt change anything either. Its still behaving like it is in the first video, it spins when the character is looking up or down.

Can you put together a simple test project (no art - just cubes etc) with just your player and camera setup in a simple scene? It’s very hard for me to give you any sensible advice without something concrete to look at.

I made one, not sure if you want me to send the project itself or a video, heres the video and code for it since its so basic

https://www.youtube.com/watch?v=8nfJdA1CvL4

theres only 2 scripts, this is the main one. the y axis wrapping just lets the camera spin on the y axis and flips the controls when its upside down. The line to look at is line 47
8179799--1065278--upload_2022-6-3_19-33-52.png
the movement script just rotates the player to the camera
8179799--1065281--upload_2022-6-3_19-34-13.png

8179799--1065272--upload_2022-6-3_19-30-1.png
8179799--1065275--upload_2022-6-3_19-33-22.png

Thanks, but it’s much easier if you send me the project. You can DM me a link.

I think I sent it, I didn’t know you could dm on here