Hey everyone!
I’m currently working on a mouse-steered plane system and I’m encountering some body-gyro related bugs, especially when turning rapidly or trying to go straight up/down. In addition, the plane just straight up refuses to go upside down for some reason? Here’s my code for the body gyro:
bodyGyro.CFrame = CFrame.new(
mainPart.CFrame.Position,
mouse.Hit.Position,
) * CFrame.Angles(0,0,math.clamp(mainPart.RotVelocity.Y*2, -rad90Deg, rad90Deg))
Not sure if this has anything to do with it, but the plane system uses a BodyVelocity to move the plane
Attached is a video showcasing the described bugs.
https://streamable.com/lxohjg
As you can see:
- When trying to go straight up, it seems to get stuck on whatever and it also refuses to go upside down
- When trying to go down at a steep angle, the plane wiggles from left to right and gets very hard to pull up
- When having my mouse in the top right corner and moving it to the bottom left, it seems to get “confused” for a bit and just stops.
Any help is appreciated!