Immediate Character stop on Collision?

Hi All-

I’ve tried a few things but I’m stuck.

I have a character moving around the screen with touches (iPad) and on a collision I need it to immediately stop and play another animation.

I have everything working, however after the collision, the character continues forward for a bit while playing the new animation.

Is there a way to have the character stop at the collision point rather than where it was headed from the touch?

Any help will be massively appreciated.

Chuck

What are you using to move the character? Rigid body? Character controller?

Hey Jesse

Sorry, a Character Controller. And I’m detecting the collision OK with

OnControllerColliderHit (hit : ControllerColliderHit)

I am using the TapControl script from Penelope, which works great- except the character keeps moving to the spot I tapped on the screen (as intended without a collision.)

I just want the character to immediately stop at the collision.

Thanks for the reply.

C-

I’m not familiar with that script, so I can’t comment directly. I would expect though that there’s probably some sort of ‘velocity’ variable or variables in the script that you could set to zero when a collision occurs. (Or, more generally, that there would be some way to modify the script in order to get the effect you’re wanting.)