[Solved] Dynamic Slice fails on Collision Check. Slice does not. (SC)

It seems like you can’t check for collision with a dynamic slice? (In ScriptCanvas at least)
Here, it always fails. Fails on check against EntityID and also fails on check against “has tag”.

(It seems like dynamic slices have a different EntityID than the base slice they were created from? If this is indeed the case, then how can we get it into SC to check against? In C++ there is a solution for this, but I am still curious…)

Hello @Lytz1,

Each dynamic slice that is spawned will have it’s own unique entity ID. When I need to keep track of all dynamic slices I spawn, I record the slice instantiation tickets and any indices I need to reference the slice by later in a map. That is completed after the Spawn node which provides the instantiation ticket. Then I use the On Entity Spawned node to check newly spawned dynamic slices, that node will output the original slice instantiation ticket along with the new entity’s ID. I check the new slice’s instantiation ticket against my map keys, when they match I can map my original index or reference for the slice to the new dynamic slice’s Entity ID.

Hope that helps!

1 Like