# Scene Graph Collision Bugs

**URL:** <https://forums.unrealengine.com/t/scene-graph-collision-bugs/2272462>\
**Category:** Issues and Bug Reporting\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, fixed, fortnite\
**Created:** [January 12, 2025, 5:31am UTC](https://forums.unrealengine.com/t/scene-graph-collision-bugs/2272462 "2025-01-12T05:31:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![UCONNGabe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UCONNGabe](https://forums.unrealengine.com/u/UCONNGabe)\
**Post date:** [January 12, 2025, 5:31am UTC](https://forums.unrealengine.com/t/scene-graph-collision-bugs/2272462/1 "2025-01-12T05:31:13Z")

</div>

### Summary

When using the `entity.FindSweepHits` or `entity.FindOverlapHits` functions. They seems to output the entire history of the collisions rather than just the currently occurring collisions.

### Please select what you are reporting on:

Verse

### What Type of Bug are you experiencing?

Verse

### Steps to Reproduce

Write a verse scene graph component which checks for collision of itself with other objects in a loop. Here is a script with a simple movement mechanism and a collision check:

```auto

```

using { /Verse.org }  
using { /Verse.org/Native }  
using { /Verse.org/Simulation }  
using { /UnrealEngine.com/Temporary/SceneGraph }  
using { /UnrealEngine.com/Temporary/SpatialMath }  
using { /Verse.org/Assets }  
using { /UnrealEngine.com/Temporary/Diagnostics }

blob\_component := class\<final\_super\>(component):

```
@editable
CheckCollision : logic = false

@editable
var Direction : vector3 = vector3{ X := 0.0, Y := 0.0, Z := 0.0 }

var CumulativeTime : float = 0.0

@editable
var Speed : float = 25.0

var MaybeCancelable : ?cancelable = false

PostPhysics(Delta : float) : void = 
    set CumulativeTime += Delta

    if(CumulativeTime >= 2.5*6):
        set Speed = Speed * -1
        set CumulativeTime = 0.0
    
    CurrentTransform := Entity.GetGlobalTransform()
    NewTranslation := CurrentTransform.Translation + Delta*Speed*Direction

    Entity.SetGlobalTransform(transform{ 
        Translation := NewTranslation, 
        Rotation := CurrentTransform.Rotation, 
        Scale := CurrentTransform.Scale
    })

OnInitialized<override>():void = 
    Print("On initialized")

OnAddedToScene<override>():void=
    Print("On added to scene")

EntityEntered(MyEntity : entity) : void = 
    Print("Entity Entered")

OnBeginSimulation<override>():void =
    (super:)OnBeginSimulation()

    set MaybeCancelable = option. TickEvents.PostPhysics.Subscribe(PostPhysics)

    Print("OnBeginSimulation")

    if:
        CheckCollision?
        MeshComponent := Entity.GetComponent[mesh_component]
    then:
        Print("Has meseh component")
        MeshComponent.EntityEnteredEvent.Subscribe(EntityEntered)

var LoopCount : int = 0

OnSimulate<override>()<suspends>:void =
    Print("OnSimulate")

    if(CheckCollision?):

        loop:
            Print("LoopCount: {LoopCount}")
            set LoopCount += 1
            Sleep(0.5)
            Hits := Entity.FindSweepHits(vector3{ X := 0.0, Y := 0.0, Z := 0.0})
            for(Hit : Hits):
                Print("Hit")

OnEndSimulation<override>():void = 
    Print("On End simulation")

    if(Cancelable := MaybeCancelable?):
        Cancelable.Cancel()

OnRemovingFromScene<override>():void = 
    Print("On removing from scene")

OnUninitializing<override>():void = 
    Print("On uninitializing")

```

```auto

To use it, simply attach the component to two entities in the scene and ensure they are configured to overlap during their oscillation. 

### Expected Result
While overlapping, there are printed results from the overlap hits. When not overlapping, there are no results. 

### Observed Result
It can be observed that while the EntityEnteredEvent, and EntityExitedEvent fire correctly, but the number of hits continuously build up.

### Platform(s)
UEFN

### Additional Notes
This occurs with both the Sweep and Overlap functions. It seems that these functions may be wrappers of the event system, and the EntityExitedEvent is failing to cause a removal from whatever data structure the collisions are stored in.
```

---

<div class="post-metadata">

**Author:** ![Bug-Reporter](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bug-reporter/32/1223650_2.png) [@Bug-Reporter](https://forums.unrealengine.com/u/Bug-Reporter)\
**Post date:** [May 22, 2025, 9:15pm UTC](https://forums.unrealengine.com/t/scene-graph-collision-bugs/2272462/5 "2025-05-22T21:15:38Z")

</div>

FORT-876592 is ‘Closed’ as ‘Fixed’. The issue will be addressed in 36.00.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [July 11, 2025, 5:31am UTC](https://forums.unrealengine.com/t/scene-graph-collision-bugs/2272462/6 "2025-07-11T05:31:40Z")

</div>

This topic was automatically closed after 180 days. New replies are no longer allowed.
