It's aniway to create a script for check distance to wall, then change the animation.
I want use for the Raiden torpedo, when he hit a enemy, pushes him to the edge of the screen, and then released.
The problem is when a wall is in front because the Raiden torpedo flying in front of the wall...