On Respawn, Player Velocity Set to 0 on all axis?
Look, I tried everything to get this to work. I've searched the Internet, especially Youtube, but I can't figure out how to force my player character to have his velocity restart at 0,0,0 when he respawns. As such, the velocity at which he falls off the cliff is the same velocity as when he respawns.
The way I see it, there are two ways to do this:
On the player script, use if(other.gameObject.CompareTag("Death"))
On the respawn script, use OnTriggerEnter (Collider other)
I can use the latter to make my player move to where he would restart, but he maintains all speed, velocity, and momentum. How do I make that NOT happen?
Search for something like "Unity set velocity to 0."
The trick is don't think about you're particular use - don't look for Respawn or Restart. Think of it as a generic question. $$anonymous$$ost common ones have been answered if you can get the Search term.
Answer by MontyPython · Oct 16, 2017 at 03:50 PM
@GamingTopTen Have you considering making a Respawn() function and setting up all your variables prespawn and have the player object spawn at the end of the Respawn() variable?
Your answer
![](https://koobas.hobune.stream/wayback/20220612141131im_/https://answers.unity.com/themes/thub/images/avi.jpg)