- Edited
I looked up this method, but for the life of me I can't seem to get it to work even though I'm fairly sure it's adding correctly. In order to prevent silly pathfinding problems with my agents I'm experimenting with using collision_exception to have them no clip through each other when they're gathering resources. Problem though, the collision still works, is there something extra I'm missing? Or is it that my code is not keeping track of things properly somewhere? I'm making use of the on_child_entered signal with a manager to track the agents when they're created so there's no silliness with it constantly executing, I then do a for loop and have each agent add the collision exception of the agent in the list.
var miningRigs = []
func _on_child_entered_tree(node):
for miningRig in miningRigs:
miningRig.add_collision_exception_with(miningRig)
func SpawnMiningRig():
miningRigInstance = miningRig.instantiate()
miningRigManager.add_child(miningRigInstance)
miningRigInstance.global_transform.origin = minerSpawnLocation.global_transform.origin
Pesudo code, would've though this would be fine but apparently not lol, let me know if you want more details on the project or screenshots.