Hit events no velocity?

I’ve been trying to set up a player that bounces by launching the character when they hit a surface, however I have run into many problems, the main one being that when using Event Hit or Component Hit events the velocity is always at zero, and not only this, but also when using a sphere trace to try and skip this issue (instead of event hit) and despite having frame rates of 144+ it constantly seems to calculate the traces after the physics tick, and so, despite having a larger trace then collision component, the velocity returns as zero.
This is really annoying and will stop me from entering the concurrent Ludum Dare, so I would very much like to know the solution, or have the issue fixed in future please.

You could try to store the character velocity as a parameter which you update every tick and then you can query it when the hit event happens and use your velocity vector to determine the ‘reflection’ velocity vector you would need to bounce around. Then it’s a matter of setting your pawn velocity to the reflection vector.

i tried that, but even 3 frames before the hit event is called the velocity is at zero - when the strange physics does occur of course, otherwise it works fine

Sounds like the order things are happening is causing the issue. You could try to use a bigger trigger object attached to your character so you can sample the velocity earlier? Sample it when that outer trigger object gets hit and OnBeginOverlap-> store the velocity then on Hit use that velocity to calculate bounce.

As I said I’ve tried a really huge physics trace and also tried a large overlap component but this only makes the problem less consistent - doesn’t eliminate it entirely, even with over 100% extra size for overlap

Hi ,

Can you post a screenshot of your blueprint setup, specifically how are you calculating the velocity change when the object hits another object?

In this image I am using a sphere trace with a HUGE radius - about 2x the radius of the actual colliding capsule of the character, as I said I have tried just using event hit (as you can see) and an overlapping capsule using the OverlapEvent - Event hit always returns velocity as zero, even though it shouldn’t, and BeginOverlap yields the same occasional failing as the sphere trace in this image.

http://i.imgur.com/XyM7dBH.jpg

I just checked on my end and the get velocity node seems to be working as intended. Check your Y value to see if it is picking up any movement. Have you tried this in a clean, blank project with no additional content.

Hi -Abbott,

We have not heard from you in several days. I am marking this as answered for tracking purposes, if you are still experiencing this error, please comment with the requested information.