3D Character can't Move upon adding Rigid body

Hi there!

I’m creating a 3D Game and I’ve stumbled upon a problem, why can’t my character move when I added collisions and rigid bodies? I would really appreciate if someone would take their time and help me figure this out

Here’s the link to my Project
https://playcanvas.com/editor/scene/1720914

Thank you so much!

Hi @iscm!

The current way you move the entity is intended for an entity with a kinematic rigidbody. If you want to move an entity with a dynamic rigidbody, you need to apply a force on the rigidbody of the entity.

Please check the page below for more information.

https://developer.playcanvas.com/en/tutorials/Using-forces-on-rigid-bodies/

2 Likes

Hi again Albertos!

I added an applyForce on my script which worked, thank you for your input. However, I’m experiencing another problem. My character falls whenever it moves, is it due to too much force applied?

You probably need to set the Angular Factor values to zero. I think only the X-axis and the Z-axis, but maybe also the Y-axis. It means that the rigidbody does not rotate on the specific axis.

image

1 Like

Thank you so much for helping me! I set the Angular Factor’s digits to zero on all axis since the camera went rotating from left to right when only applied it to X-axis and the Z-axis. Thank you so much, Albertos! you have been a huge help to my project.

1 Like