Hey guys. I’m hoping someone can help me before I go insane. I am trying to get a simple overlap event from a motion controller hitting an object, but while it works, I get an endless stream of beginoverlap, endoverlap, begin, end, etc. I would expect one event on overlap start and one on overlap end. More info:
I am working on a new VR project that uses motion controllers. I have 2 simple objects (both based on nearly-empty C++ base classes). They are as follows:
- Object 1: ThingToHit. BP inherits from AActor. This is a Cube collision as a root object with overlap set to OverlapAllDynamic. It has a child static mesh set to a cube of the same size with its collisions disabled. This is the object that should generate events when the hand controller overlaps it.
- Object 2: ThingHitting: BP inherits from a C++ subclass of AActor. The base C++ class just does basic setup assigning each controller to the appropriate hand - nothing more. It has a MotionController as root object with a sphere collision as a child. The Sphere has OverlapAllDynamic collision and a child static mesh component with collisions turned off, just to see where my hand is. This object is assigned to my hands by my pawn - just like many tutorials out there - nothing fancy.
Starting the level - nothing happens - as expected. As soon as I move my hand (ThingHitting) into the cube (ThingToHit), I get a nonstop stream of Begin and End overlap. This happens whether I use ActorOverlap or ComponentOverlap. The overlap events correctly see the overlapping object as the sphere component of the hand controller.
When I couldn’t figure out the issue, I tried using OnComponentHit on ThingToHit, but that event never triggers.
Any suggestions as to what is causing the events to retrigger even during the overlap? Any thoughts are appreciated.