Summary
When a player overlaps with a mesh_component expect the entity that returns can be casted to Player or Agent.
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Verse
Steps to Reproduce
- Create Blank Project.
- Activate scene graph beta on project settings.
- Add an empty entity.
This next steps are necessary to avoid another bug that with mesh_components of basic shapes from UEFN deactivating the collision check from it, keeps colliding.
- Create a cube with modeling tools.
- Add collisions to static mesh and set collision to overlap all
- Add new mesh created to entity.
- Uncheck Collidable option from it.
- Add and script to debug this collisions in my case volume_component
- Test in a Session
Expected Result
Entity cast to succeed being a player or agent
Observed Result
Entity cast fails for both agent and player
Platform(s)
UEFN, PC
Upload an image
Video
Additional Notes
using { /Verse.org }
using { /Verse.org/Native }
using { /Verse.org/SceneGraph }
using { /Verse.org/Simulation }
using { /Fortnite.com/Playspaces }
volume_component := class<final_super>(component):
var Subscriptions :[]cancelable = array{}
OnBeginSimulation<override>():void =
(super:)OnBeginSimulation()
if(MeshComp := Entity.GetComponent[mesh_component]):
EntityEnterResult := MeshComp.EntityEnteredEvent.Subscribe(OnEntityEnteredVolume)
EntityExitResult := MeshComp.EntityExitedEvent.Subscribe(OnEntityExitedVolume)
set Subscriptions += array { EntityEnterResult }
set Subscriptions += array { EntityExitResult }
OnEndSimulation<override>():void=
(super:)OnEndSimulation()
for(Sub:Subscriptions):
Sub.Cancel()
OnEntityEnteredVolume(EnteredEntity:entity):void=
CheckEntityWithRoundManager("[OnEntered]",EnteredEntity)
if(Agent := agent[EnteredEntity]):
Print("[OnEntered] Casting [EnteredEntity] to [Agent] succeded")
else:
Print("[OnEntered] Casting [EnteredEntity] to [Agent] failed")
if(Player:= player[EnteredEntity]):
Print("[OnEntered] Casting [EnteredEntity] to [Player] succeded")
else:
Print("[OnEntered] Casting [EnteredEntity] to [Player] failed")
OnEntityExitedVolume(ExitedEntity:entity):void=
CheckEntityWithRoundManager("[OnExited]", ExitedEntity)
if(Agent := agent[ExitedEntity]):
Print("[OnExited] Casting [ExitedEntity] to [Agent] succeded")
else:
Print("[OnExited] Casting [ExitedEntity] to [Agent] failed")
if(Player:= player[ExitedEntity]):
Print("[OnExited] Casting [ExitedEntity] to [Player] succeded")
else:
Print("[OnExited] Casting [ExitedEntity] to [Player] failed")
CheckEntityWithRoundManager(Prefix:string, EntityToCheck:entity):void=
if:
Playspace := Entity.GetPlayspaceForEntity[]
Players := Playspace.GetPlayers()
then:
for(Player : Players):
if:
PlayerEntity := entity[Player]
then:
Print("{Prefix} Player to entity cast succeded")
if:
EntityToCheck = PlayerEntity
then:
Print("{Prefix} Entity is a player")
return
Print("{Prefix} Entity was not a player")



