Conserving the Orientation of CFrame upon Collision

Hi All!

I’m currently building a plane that you can control by mouse movement. I have attached a video below that shows what I mean, as well as the problem.

Currently I control the orientation of the plane via CFrame, and I use VectorForces to move the plane left, right, forward, and backwards. All parts, except the Base part (the gray part in the video) is set to massless. Hovering effect has been achieved via negating the gravitational force

The problem is that when the plane hits the ground, it “flattens” to the ground. I want the orientation / angle of the plane to be preserved, and prevent physics from flattening the plane to ground. Is there way to fix the orientation as the plane collides?

Thanks!

1 Like

You can try use a body gyro that forces the plane to stay at the angle it had when it hit the ground.

2 Likes

@Stack3dBlocks Thanks for the reply! You were right - bodygyro did help with conserving the orientation!

But because BodyGyro is deprecated, I decided to use AlignOrientation and it worked even better. For future readers who are curious how to replace BodyGyro with AlignOrientation, do the following:

  1. Add AlignOrientation to your part that you want to stabilize / conserve
  2. Add Attachment to the same part.
  3. Set AlignOrientation’s attachment0 to Attachment you added in step 2
  4. Set RigidityEnabled to True.
  5. Manipulate the orientation / angle of the part by manipulating the CFrame of AlignOrientation - NOT the part’s CFrame!
2 Likes