No announcement yet.

Hit Velocity In Hit Result

  • Filter
  • Time
  • Show
Clear All
new posts

    [FEATURE REQUEST] Hit Velocity In Hit Result

    Event Hit's really need to have the collision velocity inside the hit result. Calling the velocity of either object in the hit event returns the 'after-collision' velocity or 'during-collision' velocity and there is currently no way to get the velocity of either object or even a relative velocity from the frame before the collision. The problem is caused by the fact that the velocity changes or stops when the collision takes place. You hit a wall, you stop.

    I have run into this problem numerous times and on various builds and for completely different reasons. A quick google tells me others are having the same issue.

    On occasion I have been able to use an overlap event on a separate, slightly larger collision box as a work around but there are occasions such as character movement systems where this isn't possible or realistically usable.

    There is probably several complicated ways of getting this, or the hit result I'm getting may be a bug, but in either case I strongly feel that this is something that is relevant to the hit result and would be used often enough that it should be included there.

    Thank you.

    Which velocity you are interested in? Is it collision velocity or velocity before collision and for which objects?
    For the object receiving collision event you can try using NormalImpulse divided by mass, this should give you hit velocity.
    Youtube Channel