Reddit thread containing video example
I’m running into some unexpected behavior with a door trigger. Here’s what’s happening in the video:
A laser (static mesh with simple box collision) is shot towards the green sphere but is blocked by an object. When the laser hits the green sphere, the sphere opens the orange door. The green sphere’s blueprint has a sphere collider around it that implements OnComponentBeginOverlap and EndOverlap. In the event code, I check to see whether the overlapping component is the laser static mesh, and if it is, open the door. This works mostly, but you’ll see in the video that when the laser beam is blocked by the metal object but gets somewhat close to the sphere, the OnOverlap event fires.
The laser beam is created by scaling a 1-unit long static mesh along the X-axis every tick. I thought that maybe the laser static mesh collision was scaling further than the static mesh itself, but as you can see towards the end of the video (although it’s maybe hard to see), the box collision on the laser static mesh doesn’t extend past the end of the laser.
Some screenshots of the code:
Logic to scale the laser static mesh every tick
Sphere collider’s OnComponentBeginOverlap implementation
This has me really stumped. Any help would be appreciated!