I was following the UMG Drag and Drop training video (using 4.9) and calling on “Set Actor EnableCollision” or “Set Enable Collision” causes OnComponentBeginOverlap to be called a second time causing pickups placed in the level to be picked up twice. This behaviour only occurs if you attempt to change the collision settings during the overlap event.
It appears to be easily reproducible and only occurs in 4.9, following the same steps in 4.8 will only trigger the overlap event once.
Reproduction:
- Create First Person Project
- Create new Blueprint of Actor type
- Add Scene Component and make it the root component
- Add Static Mesh and assign a model
- Add Sphere Collision Component
- Right click Sphere Collision Component and choose Add Event->OnComponentBeginOverlap
- From the added OnComponentBeginOverlap event cast Other Actor to FirstPersonCharacter
- Disable collision using Set Actor Enable Collision or Set Collision Enabled
- Add a print string as debug message
- Place blueprint in level and walk in to it
Pic of the overlap event:
Result 4.9:
Result 4.8: