Download

Push ability

Hello everyone, I’ve been thinking a bit about the best way to solve this thing and I’m not really sure…

So what I’m trying to make is when a player presses the corresponding button he would push dynamic objects and other players in front of him, away. sort of like in force unleashed:

https://youtube.com/watch?v=JWXffD8t45k

At first I was thinking of spawning an invisible object and use projectile movement and literally shove anything it collided with away, but it seemed inelegant and possibly like a bad solution.

So how would you go about making such an ability? Any ideas?

My idea would be to spawn a cone in the direction the player is pointing. On any actors within(overlap) that cone, apply an impulse force based on the location and rotation of the player or the cone. Another option may be to have the cone animate with increasing size or depth that can push objects away. My guess would be that the first idea is better as you have more control and have the option to make the actors fly slightly upwards instead of just pushing them straight back.