0
  • How can I lock the position of my FirstPersonController in Ursina

  • When my FirstPersonController remains standing, another Entity can go through the FirstPersonController entity though I used collider. How can I solve that ?

Sami
  • 1
  • 1

1 Answers1

1
  • What exactly do you mean by "locking" ? You can disable a controller with your_controller.enabled = False saying your_controller is a FirstPersonController.
  • A collider is not a wall, it's just something that can interact with raycasts. If you want collision, you must shoot a raycast. If it hits something (an Entity with a collider), check if the distance() between the Entity and the origin of the raycast is below a certain level. Just do something according to the result, like disabling the Entity. I'd recommend looking at FirstPersonController's code and globally at samples on the Ursina repository.