Get Velocity Never Zero's Out

Hello, been fooling around with Unreal a while now but I’ve come across something I’d more or less just like some reasoning behind.

I’ve created a simple BP that will print the velocity of a projectile fired from a gun to the screen. However, once the projectile comes to a stop, I don’t destroy it or even turn the physics off on it. But it still shows that the projectile has velocity even though it doesn’t. Is this possibly a bug/limitation in the engine code? I would expect that when something stops moving, “Get Veolocity” would report that XYZ of the Vector is 0.

4c563a171e284ed221a8aaed684495cfa4150f38.jpeg
This is the BP snippet I’m using.
ffbed2ac838573aa2c8edd7fe39fc64462cd2599.jpeg
This is what is still displayed after the projectile stops. I would expect it to reach 0.

Thanks in advance!

Think I figured this one out on my own…

If my assumptions are correct. When using a Projectile component in the BP it simulates physics on the root component until it comes to a stop. Once it’s come to a stop all physics processing stops. So in that instant that the physics processing stops, whatever the last velocity the object had is what gets stuck in the Vector variable never to be updated again… Seems like a good idea in theory but we should have the option in the Projectile component to not have physics end on the projectile.

Really figured it out this time. So the physics stops after the first bounce and after the velocity has reached a number below the “Bounce Velocity Stop Simulating Threshold” setting in the Projectile component. If you set that to 0 then the velocity will eventually 0 out.

Thank you forums for being my Duck, haha

Maybe this will help someone out in the future, who knows.

1 Like

Thank you for posting the solution that you found! It’s annoying when you find a thread through a Google search and the OP found a solution but didn’t post it. :slight_smile:

Exactly what I needed! Thank you! I’m creating seeds to fall from a tree, and couldn’t get them to spawn new trees properly. Also, when I took the Velocity Length, I found it worked much better if I was looking for a Velocity Vector length less than 5, as opposed to waiting for zero.

Greetings @TColonel !

We see that this is your first time posting in our forums! :medal_sports: We gladly welcome you to the Unreal Engine community with open virtual arms! We are so stoked that you were able to find a solution here! You are part of an awesome community, and I thank you for your contribution to this thread. Happy Creating and continue to “Make Something Unreal”! :muscle:t4:

I’m wondering if you could wait for the event “on Component sleep” instead of checking velocity. Would need to turn on “generate wake events” in the object details panel.