Talk:Trigger gravity

From Valve Developer Community
Jump to: navigation, search

How to change gravity of physics objects

Although trigger_gravity only works for players, there is another way to change the gravity of objects.

1.) Create a phys_thruster and place it anywhere in the map and assign it's Target Name to whichever physics object you want to change the gravity of.

2.) Set it's direction to "up" for lower gravity, or "down" for more gravity.

3.) set the flags to the following:

[x] Ignore Pos

[x] Start On

[x] Apply Force

[] Apply Torque

[] Orient Locally

[x] Ignore Mass

4.) Change Force depending on the kind of gravity change you want. Example: setting the direction to "up" and "Force" to 800 will make the object float with exactly no gravity at all.

//Pandaboy


Team Fortress 2

Reminder: A player killed under the effects of gravity will respawn with that same gravity.

Solution: Create a trigger_gravity around the spawn points with a gravity value of 1.0. Ninjaofsauce (talk) 14:00, 23 October 2018 (UTC)


Another way to change gravity on players

You can just do an Addoutput > gravity x to players, where x can be any number, even -1. --NvC DmN CH (talk) 09:19, 4 August 2019 (UTC)

Another way to change gravity for physics objects

The trigger_vphysics_motion from the HL2 fgd can be used to alter the gravity of physics objects by making it apply only to physics objects and altering the SetGravityScale keyvalue, though in testing I found that it should be used for props only as it had inconsistent effects on the player's gravity, randomly cutting out and dropping only the player.