How to Set Gravity to a specific Object?

I saw CharacterMotor but isn’t there a built in way to set the gravity of a specific object, lets say a sphere without gravity and all the other object has gravity? The object needs to be dynamic too not kenematic. Basically I wanted to make a sidescroller airplane that I can move. Also can there be different Physics configuration to different objects?

If it has a RigidBody, you can turn off gravity on that.

You can’t set gravity for a specific object - I wish I could do that in the real world, but PhysX like the real world doesn’t allow it!

You can apply a constant force to an object to keep it in the air though, which you can use to specify your own gravity:

  public Vector3 gravityForThisObject;

   void OnFixedUpdate()
   {
        rigidbody.AddForce((gravityForThisObject-Physics.gravity) * rigidbody.mass);
   }

This is the setup of my character.