Download

Best way to have compontent attached to motion controller component trigger collision and high speed

So I have a static mesh component with a collider attached to a motion controller component. I this to collider with other movable (really just hidden and shown) static mesh components placed in the world. Nothing is moved by physics in the world.

How can I get either hit or overlap to trigger no matter how fast the motion controller is moving? Currently with CCD enabled and physics substepping turned on I still fail to get overlaps when moving very fast. This appears to be because the motion controller teleports to it’s position. Is there a way I can disable the teleporting or should I sweep / box trace from the previous point to the current point? I’m using on overlap at the moment as on hit doesn’t seem to trigger for me.

Hi! I have recently completed a VR game which relies on the meshes parented to the controllers to move very quickly to catch objects thrown at you at different speed/angles. I didn’t experience any miss/lag in the hit detection despite the high speed. Any chance some other part of your code is slowing things down and affecting the collision detection? Did you try with a simpler version of the basic dynamics to see whether it works in that case?

Cheers,
Marco.

It’s running way above frame rate. If I artificially limit the frame rate to 45 then I get a huge amount of misses. I’d like to make sure it always triggers any overlaps between update points.

I would suggest using a sphere trace on tick. Collision overlaps attached to motioncontrollers doesn’t always work very well, especially OnOverlap/OnEndOverlap