Stop Objects from moving on Z-axis in 2D

Facing the same problem. I use AIPath and simply do aiPath.destination = something;

The destination’s Z values are ALWAYS 0. When the agent starts moving, his Z value constantly fluctuates between -5 and 5, usually between 1 and 5 for no reason at all.

@aron_granberg

2 Likes

I have the same problem. Using AILerp and setting destination via AIDestinationSetter with targets that have z = 0f.

1 Like

I had this same problem and it was messing with my spatial audio for some reason. I fixed it by changing the starting Z pos of my AI, for some reason it only moves in the Z axis when its starting Z pos is 0. I noticed this also happens in the video shown above (min 2:20 aprox)