Character Continues Moving when level restarted

I have a script that allows me to restart my level on the win/death screen, this however takes the players velocity and direction from before they win/die and continue to output that velocity when the player restarts the level, Example here:


my guess to fix it is somewhere in my win/death script to remove all the players velocity so when they respawn there is no velocity that carries over, i just don’t know how to do that

this is the project PlayCanvas 3D HTML5 Game Engine

Hey, you can try forcing linear velocity to (0,0,0) and may have to teleport the player entity to its default position as well. Linear velocity is the property of a rigid body so you can simply access it through rigid body. To read more here is the API reference: RigidBodyComponent | PlayCanvas API Reference

i can see what you imply but i don’t know how i would implement that in a script, i’m not much of a coder, im more artistic so i’m not really knowledgeable on coding

In that case, I would recommend you to get a little know-how about Playcanvas. Here is the series of Playcanvas tutorials for you to get started : https://www.youtube.com/watch?v=fXc-JjH2nNo