Hello everyone, I am fairly new to this so please bear with me. I have created a stop sign in my game and placed a trigger box next to it.
How can I make the trigger box detect that a car has stopped moving within the box using blueprints?
Hello everyone, I am fairly new to this so please bear with me. I have created a stop sign in my game and placed a trigger box next to it.
How can I make the trigger box detect that a car has stopped moving within the box using blueprints?
How are you moving the car?
Using enhanced input via arrow keys.
Not what I meant. What is the method of moving the car? Which nodes follow?
Are we using physics to move it? Is the car a pawn with a movement component? Are you adding world offset? Detecting when things stop moving will depend on how they are being moved.
My apologies. The car is a pawn with a movement component, also I am using Chaos Vehicles if this helps
In that case you can simply query the veloctiy. Start doing it every frame (or every x seconds) as soon as the car enteres the box, stop doing it once it leaves. Compare the lenght of the velocity vector to a near-zero value.
Do you mind telling me which nodes I can use to achieve this? Sorry I am a bit lost with this one
Build a stopping area like so:
If we stop like this, it’s a failed parking attempt:
The car is not overlapping the inner box
This is much better, the car overlaps both boxes
Adjust the size of both volumes to dictate how accurate the player must be in order to stop correctly.
The script is in one actor, ideally in the base vehicle class:
Things can be done better, but we’d need to know the scope.
Oh, this makes sense now! thank you so much for the help, truly.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.