# Hitting players with vehicles in mutliplayer - need help thinking this though

**URL:** <https://forums.unrealengine.com/t/hitting-players-with-vehicles-in-mutliplayer-need-help-thinking-this-though/150412>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [September 8, 2020, 2:18pm UTC](https://forums.unrealengine.com/t/hitting-players-with-vehicles-in-mutliplayer-need-help-thinking-this-though/150412 "2020-09-08T14:18:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chumble](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chumble](https://forums.unrealengine.com/u/Chumble)\
**Post date:** [September 8, 2020, 2:18pm UTC](https://forums.unrealengine.com/t/hitting-players-with-vehicles-in-mutliplayer-need-help-thinking-this-though/150412/1 "2020-09-08T14:18:26Z")

</div>

I’m having trouble coming up with a good solution for hitting players with vehicles. The major problem is that when a car physically hits a player, the car stops dead. I can’t have that.

So my first attempt was to put a collision box around the car and knock players out of the way. But the problem is the server doesn’t check regularly enough to see if it hit a player. So more often than not, the car mesh has hit the player and physically stopped before the collision box collision has been detected.

[![](https://i.imgur.com/wdJUB6s.png) ](https://i.imgur.com/wdJUB6s.png)

And even if it does check in time, needing to push the other player out of the way before the car can hit the player is a tricky and finicky situation that I don’t think can be relied upon.

So my second attempt was to disable physical collision for the mesh itself, detect overlap events and then knock the player out of the way. This _worked_ but also players need to physically be able to jump on cars and run into them. So I had to conditionally enable/disable collision based on the speed of the car. But there’s no good answer here for “what speed?”. The player should be able to jump on a car if it’s moving at low speeds. But the car should be able to push a player if it’s running at that same low speed. So I started working with a system where I used a collision box to detect players in front of the car and knock them around if the car is moving at all. And then disable collision on the mesh if the speed is fast enough. But it’s just … such a mess.

There has to be some better way to handle this. I’ve read through so many old (3+ years) posts about people with this issue. I’m really hoping a better solution has been found that I can’t think of … so I’m posting here in desperation.

---

<div class="post-metadata">

**Author:** ![Capsu1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Capsu1](https://forums.unrealengine.com/u/Capsu1)\
**Post date:** [September 9, 2020, 5:26pm UTC](https://forums.unrealengine.com/t/hitting-players-with-vehicles-in-mutliplayer-need-help-thinking-this-though/150412/2 "2020-09-09T17:26:53Z")

</div>

Instead of a collision box, have you considered having the car trace ahead of itself to detect players instead? The trace would extend along the car’s forward vector a distance using current velocity and deltatime, to see if it _ **would** _ hit a player next tick. If so, you can go ahead and push the player. The faster the car moves, the further ahead it is tracing.
