# Stopping Sedan from moving after exiting

**URL:** <https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539>\
**Category:** World Creation\
**Tags:** vehicle, vehiclemovementcompo, unreal-engine, Physics, question\
**Created:** [December 4, 2014, 5:11am UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539 "2014-12-04T05:11:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Freakazoid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Freakazoid](https://forums.unrealengine.com/u/Freakazoid)\
**Post date:** [December 4, 2014, 5:11am UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/1 "2014-12-04T05:11:07Z")

</div>

I am having trouble getting a vehicle to stop when you exit (unpossess) the vehicle. I can’t seem to figure out what I need to do in the Sedan Blueprint.

What happens specifically is when I exit, the Sedan just keeps going. It does not even slow down.

Any help would be appreciated.

Thanks.

---

<div class="post-metadata">

**Author:** ![Freakazoid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Freakazoid](https://forums.unrealengine.com/u/Freakazoid)\
**Post date:** [December 11, 2014, 4:11am UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/2 "2014-12-11T04:11:19Z")

</div>

Does anyone know how to do this?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_195613a7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_195613a7](https://forums.unrealengine.com/u/anonymous_user_195613a7)\
**Post date:** [March 6, 2015, 8:03pm UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/3 "2015-03-06T20:03:07Z")

</div>

im having the same problem

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_195613a7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_195613a7](https://forums.unrealengine.com/u/anonymous_user_195613a7)\
**Post date:** [March 6, 2015, 9:51pm UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/4 "2015-03-06T21:51:11Z")

</div>

Hey,

I found out a fix (kind of) after messing around for a couple of hours with BP

I just made it so you cannot exit unless you are not holding w or s you do this by adding BOOL and then branch saying if it is true then do not get out of car (however your BP for that looks) and if its false then run the BP to get out of the car hope this helped…

---

<div class="post-metadata">

**Author:** ![DanMann](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DanMann](https://forums.unrealengine.com/u/DanMann)\
**Post date:** [August 6, 2015, 10:04pm UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/5 "2015-08-06T22:04:52Z")

</div>

Having the exact same problem. Weirdly enough, even if I set the vehicle to set it’s throttle to 0 when the vehicle is unpossessed the vehicle keeps moving anyway. If I set the throttle to be -1 when the vehicle is unpossessed, the vehicle moves backward though. So it seems as though the vehicle will set it’s throttle to any value except 0 when it is unpossessed.

---

<div class="post-metadata">

**Author:** ![Horokey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Horokey](https://forums.unrealengine.com/u/Horokey)\
**Post date:** [February 16, 2016, 1:27pm UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/6 "2016-02-16T13:27:33Z")

</div>

C++ solution:  
GetVehicleMovement()-\>DestroyPhysicsState();  
GetVehicleMovement()-\>RecreatePhysicsState();

This two methods will help you to stop vehicle. Worked for me.

---

<div class="post-metadata">

**Author:** ![scha](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/scha/32/1135430_2.png) [@scha](https://forums.unrealengine.com/u/scha)\
**Post date:** [July 8, 2017, 5:37pm UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/7 "2017-07-08T17:37:46Z")

</div>

1. Create an AIController which does nothing but set the throttle of the controlled vehicle to 0 (in the tick)
2. Unpocess the car from player controller
3. Pocess the car by your new AIcontroller
4. Profit

---

<div class="post-metadata">

**Author:** ![Todd.Vance](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Todd.Vance](https://forums.unrealengine.com/u/Todd.Vance)\
**Post date:** [December 29, 2018, 4:12am UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/8 "2018-12-29T04:12:36Z")

</div>

Seems a bug (as of 4.21.1): the throttle won’t be controlled unless it has a controller. So the this solution (or something similar) will work. So when you detach a controller, whatever is the last input will hold.

---

<div class="post-metadata">

**Author:** ![Naira\_Fam](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Naira\_Fam](https://forums.unrealengine.com/u/Naira_Fam)\
**Post date:** [August 22, 2021, 9:44am UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/9 "2021-08-22T09:44:48Z")

</div>

![346920-stopmovingvehicleonexit.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/b/a/1baad81035bf1549141e539c8baef6df3e5fe374.png)

This solution works for me.

- Create a custom event with a timeline

- You can make the timeline length as long or short as you want

- Add nodes “SetThrottleInput(0.0)” and “SetHandbrakeInput(true)” to the “Update” execution pin of your timeline

- Add your exit logic to the “Finished” execution pin of your timeline

- Call this custom event on whenever exit input is pressed.

This way you can set the input and brake over a period of time before the vehicle is unpossessed

---

<div class="post-metadata">

**Author:** ![pawnlogic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@pawnlogic](https://forums.unrealengine.com/u/pawnlogic)\
**Post date:** [March 5, 2023, 6:35am UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/10 "2023-03-05T06:35:06Z")

</div>

> 

```
Create an AIController which does nothing but set the throttle of the controlled vehicle to 0 (in the tick)
Unpocess the car from player controller
Pocess the car by your new AIcontroller
Profit

```

> 

This is the working solution for UE5.1 with chaos vehicles, seems if chaos vehicles are not possessed they won’t stop moving.

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [March 5, 2023, 11:17am UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/11 "2023-03-05T11:17:00Z")

</div>

You shouldn’t have any vehicle that isn’t use anywhere.  
Make a static mesh and replace them at runtime when needed/not needed.

---

<div class="post-metadata">

**Author:** ![pawnlogic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@pawnlogic](https://forums.unrealengine.com/u/pawnlogic)\
**Post date:** [March 8, 2023, 1:45am UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/12 "2023-03-08T01:45:27Z")

</div>

That makes sense it seems too many AI controllers occupying these could affect performance and lead to strange bugs.

---

<div class="post-metadata">

**Author:** ![swolf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@swolf](https://forums.unrealengine.com/u/swolf)\
**Post date:** [April 17, 2023, 4:54pm UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/13 "2023-04-17T16:54:43Z")

</div>

This isn’t a solution to the problem OP is having. Imagine the halo warthog, where players are jumping into and out of the vehicle at any given moment; You want it to set acceleration and steering back to 0 when the driver exits, but still otherwise have it behave like a vehicle, at the very least, while it coasts to a stop.

That said, If the vehicle needs a controller to receive any input, so be it, but it would have been nice if it threw out a warning somewhere so one wouldn’t spend a bunch of time trying to figure out why the seemingly obvious solutions aren’t working.

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [April 17, 2023, 5:41pm UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/14 "2023-04-17T17:41:07Z")

</div>

Doesn’t need to be a vehicle if there is no accellerarion. You can simulate physics on a mesh and retain the last impulse or apply the same value of it.  
Better yet, you can calculate it your self and use a timeline to keep it moving.

Genrally, if it isn’t possesed by a player everything within a vehicle class becomes useless…

---

<div class="post-metadata">

**Author:** ![swolf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@swolf](https://forums.unrealengine.com/u/swolf)\
**Post date:** [April 21, 2023, 10:50pm UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/15 "2023-04-21T22:50:45Z")

</div>

I would argue that is a pretty use-case specific solution. If you have more vehicles available then you would want simulated, like GTA or something, then sure, that’s probably a very reasonable idea.

If you’re making a smaller multiplayer sandbox game (ala Halo), then all the vehicles on the map could and would potentially all be driven at the same time, so that overhead’s got be budgeted in anyway. A system to swap out vehicles with non vehicles would probably not net you much usable performance gains at that point, but it would definitely cost development and support time.

and if you’re like me and you’re just playing around, then performance isn’t really a big deal in the first place, and the problem (like OP) was not understanding why the vehicle component wasn’t accepting input when there was no player controlling it: @Todd.Vance was right, it wont accept input without a controller. (Which probably makes sense in the context of how input in pawns works, but in the moment it seems very counter intuitive that it was ignoring input… at least to me)

---

<div class="post-metadata">

**Author:** ![JoSf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JoSf](https://forums.unrealengine.com/u/JoSf)\
**Post date:** [July 22, 2023, 3:56pm UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/16 "2023-07-22T15:56:34Z")

</div>

For those looking for solutions, no need to bother with dummy AI controllers or making a custom movement component anymore, there is “Requires Controller for Inputs” boolean flag in the new ChaosVehicleMovementComponent.

Once you unpossess and want to update the input values though, you might either want to add delay node (if quick and dirty) or some check for whether if a driver is still present in your car’s input events, because the InputActions will also fire their “completed” events after the unpossession.

---

<div class="post-metadata">

**Author:** ![Manim8](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Manim8](https://forums.unrealengine.com/u/Manim8)\
**Post date:** [January 7, 2024, 3:12pm UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/17 "2024-01-07T15:12:13Z")

</div>

The way I do it is…  
When we exit the vehicle, the very first thing I do is:

 ![Screenshot 2024-01-07 150623](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/e/5/0e54e20d8207744263a8b5dc657765126cd1e3a3.png)

Then continue with the exit vehicle/un-possess code.

Adding that delay seems to work but not if below ‘0.3’. I guess if you have an exit vehicle animation that is say 3 secs long, you could trigger the animation first, then do the above, then set the delay to however long the animation is.

---

<div class="post-metadata">

**Author:** ![Jinkel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jinkel/32/998041_2.png) [@Jinkel](https://forums.unrealengine.com/u/Jinkel)\
**Post date:** [May 13, 2024, 11:20pm UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/18 "2024-05-13T23:20:01Z")

</div>

No need to add delay right?, just unchek “Requires Controller for Inputs” and done.

---

<div class="post-metadata">

**Author:** ![powerartist2587](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@powerartist2587](https://forums.unrealengine.com/u/powerartist2587)\
**Post date:** [October 13, 2024, 8:57pm UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/19 "2024-10-13T20:57:05Z")

</div>

This is the answer

 ![HelpingOut](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/7/e/07e5d2671f237b1b1e2415daad787cb232d9fc42.png)  
With this solution, you don’t even have to put HandBrake if you don’t want to (I put it for personal preference), and it works it won’t drive off anymore, thank you soo much, I spent hours looking for this fix lol

---

<div class="post-metadata">

**Author:** ![amanchauhan2432](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@amanchauhan2432](https://forums.unrealengine.com/u/amanchauhan2432)\
**Post date:** [November 28, 2024, 10:42am UTC](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539/20 "2024-11-28T10:42:02Z")

</div>

You just need to call reset vehicle function from Vehicle Movement Component when you un-possess from the vehicle.

 ![Reset](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/8/f/a8f060f85c05b616ecd4d9653dd62d41850662b1.png)

[Next page](https://forums.unrealengine.com/t/stopping-sedan-from-moving-after-exiting/300539.md?page=2)
