Reproduce trigger_push
Posted: Tue Apr 03, 2018 4:47 pm
Hey,
I'm currently trying to find out, how I can reproduce the trigger_push entity.
My idea is, to create a clean trigger and make it useable for all in one, like teleport, gravity, push, etc, but I'm stuck on the push part.
The first approach I did was, that I simply set the base velocity to the boost vector on start touch. (push dir with speed/length) But i have to adjust it on top of the normal player base velocity.
But the trigger_push behaves like, it constantly pushes you until you leave the trigger.
If i would do that every tick, i would most likely leave the zone with like 100.000 u/s, lol.
Do you guys have any idea? It works for the very first tick, but after I have to somehow filter the real-player-base-velocity next to boosted vector. (So the player can also strafe and is not limited) I tried to look it up on valve's source but I couldnt find anything how they add that speed.
I'm currently trying to find out, how I can reproduce the trigger_push entity.
My idea is, to create a clean trigger and make it useable for all in one, like teleport, gravity, push, etc, but I'm stuck on the push part.
The first approach I did was, that I simply set the base velocity to the boost vector on start touch. (push dir with speed/length) But i have to adjust it on top of the normal player base velocity.
But the trigger_push behaves like, it constantly pushes you until you leave the trigger.
If i would do that every tick, i would most likely leave the zone with like 100.000 u/s, lol.
Do you guys have any idea? It works for the very first tick, but after I have to somehow filter the real-player-base-velocity next to boosted vector. (So the player can also strafe and is not limited) I tried to look it up on valve's source but I couldnt find anything how they add that speed.