Closed DrVrej closed 4 months ago
But it is bound for all entities.
Thank you for the reply, I didn't test it personally as the wiki had a red bold warning stating it's for players only. I see that you just removed the false note which is good as it must have confused many others too. 👍
Details
Currently "SetGravity" only works for players, but in the engine, it used in many other places and works for all entities. It's very useful for projectiles as it makes the trajectory code much simpler to calculate by using a consistent gravity. An example can be found in
grenade_spit
where it sets the gravity to 600 -> Link. Aside from projectiles, it's also used for couple of NPCs, which would also be useful to have access to in Lua.