Gravity

The Gravity component provides settings for controlling gravity. The standard gravity component applies gravity in the world y-axis and provides the following settings:

Option

Details

Use Physics 2d Gravity

If checked the Phsyics2D.gravity.y value will be used for gravity.

Gravity

Value to use for gravity (ignored if Use Physics 2d Gravity is checked).

 

There is also an alternate Gravity component provided called FlippableGravity. This component allows gravity to be flipped from a negative y value to a positive y value. It provides the following settings:

 

Option

Details

Use Physics 2d Gravity

If checked the Phsycsi2D.gravity.y value will be used for gravity.

Gravity

Value to use for gravity (ignored if Use Physics 2d Gravity is checked).

Gravity Flip Action Key

Index of an action Key in the Input which triggers the gravity flip.

 

Use -1 if you want to control the gravity flip from triggers, code or another means via the public method FlipGravity().

Flip Character Immediately

If set the character will be immediately rotated by 180 degrees when the gravity is flipped.

 

If unset you instead rely on the movements to set the orientation for the character.

 
Warning: Not all movements support flippable gravity. The movement inspector will warn you if a movement has not been written to specifically support flippable gravity.
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk