physenv.SetGravity
From GMod Wiki
| Function | |
| Syntax |
physenv.SetGravity( Vector Direction ) Where is this used? |
| Description: | |
| Sets the gravitational direction for physics objects. | |
| Returns: | nil |
| Part of Library: | physenv |
| Realm: |
|
|
|
This is a dangerous function. Use it with care! |
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Physenv.SetGravity]Physenv.SetGravity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
Additional Notes
- WARNING: If this is used too early (even in InitPostEntity?), it will cause your game to crash.
- Physobjects need to have obj:Wake() applied to them for the gravity change to initialize
- The value behaves like standard GMod gravity - 600 is normal and 0 is none