I so far have a script for spawning a prefab when you enter a trigger, only issue is I want it to spawn when im MOVING inside of the trigger. So it’s somewhat like OnTriggerStay, but only activates when the player moves around. Tried OnMove, doesn’t work.
Following along with the suggestion of @TreyH , it may be worth your time to go over some of the provided tutorials for Unity, as they briefly cover a section about boolean animation triggers that you could combine with the OnTriggerStay()
event to accomplish exactly what you’re looking for. Establishing this movement boolean is best practice as you’ll certainly have more than one scenario where you’d want to check if the player is moving, so allowing movement to set it to true or false takes care of a lot of code redundancy. I digress, example for the question provided,
void OnTriggerStay(Collider other)
{
if(animator.GetBool("isMoving"))
{
///Do Stuff;
}
}