On Impact Event

Aaron

New member
First off want to say thank you so much for the Character Controller & Behavior designer. Using PlayMaker with both has been so nice for making fast iterations of ideas come to life.

Just wanted to stop by and see if I could get any pointers on something.

The goal is to be able to cast a magic item that triggers the state machine to switch from wild (animal) to tame (animal).
I'm testing this all on a cube.

It works perfectly fine for cast -> SetState -> Stop Wander Behavior Tree , Start Follow Behavior Tree.
The only problem is that when I make a second cube so cube and cube(1) the On Impact event doesn't trigger on cube(2) because it's trying to detect Cube not cube(2).
Is there a way for it to detect a variable of a prefab similar to how I can in PlayMaker? I'm sure there is alternative methods for getting the same result of taming the cube. Just curious if I can continue on this iteration or start a new one for the idea.

event.png
event1.png
 
Happy to hear that you're enjoying our tools! The OnImpactEvent will run on the collider that it impacts. Are you impacting Cube2? A good way to debug this is to place a breakpoint/log within MagicItem.PerformImpact to determine what is being impacted.
 
Top