[HELP] - How to change gravity.

Hi all

:face_with_spiral_eyes: I’m looking for guidance from people about the gravity changes :face_with_spiral_eyes:

As the description from the image:
*2 plan:

  • Cube (NPC start)
  • Eclip (characters fly off the cube and within the scope of the eclip and he can move on)
  • If this is an article normative rules, help me move it if you can
    Thx for support :slight_smile:
    cb

Changing global gravity is easy, just set Physics.gravity as a vector with the direction and magnitude you desire.

But if you want to apply different gravity to different objects depending on where they are, you’ll need to do that on a per-object basis. Off the top of my head, my first thought is to add a Rigidbody and a ConstantForce component to all objects which can be effected by gravity. Then use a bunch of triggers in your different gravity areas to set that ConstantForce to point in the desired direction for that area.

This script on the wiki might also help point you in the right direction:
http://wiki.unity3d.com/index.php/Gravity

Thx @angrypenguin and @markpdolby. And can you help me make a small demo with 2 gravity.