ursina
ursina copied to clipboard
Collision glitch
Collision glitch allows FirstPersonController
to phase through ceilings. Here is a video of that happening:
https://user-images.githubusercontent.com/81050362/113291470-5ecaf680-92f3-11eb-9093-acaa9623fa81.mp4
It happens when you try to walk onto a higher Entity
from a lower one.
As you can see, the player gets stuck below the ceiling and doesn't fall.
I had the same issue.
The problem is that a raycast is being used just below the player, causing it to go through the floor when it is below foot level.
i have the same problem too
How to solve it then?
ushu3323 explained it
he explained the problem, not the solution
I guess it ca be solved with a check condition always checking for the position of player with respect to ceiling. If the player's position is below the ceiling we can the player fall as required.
The check condition running in the game loop,(event loop) for each iteration of game loop.
this issue can be totally soved using panda3d's collision detection. But you have to modify entity class and implemet this. here's the manual: https://docs.panda3d.org/1.10/python/programming/collision-detection/index I'm working on this issue. when this is solved, i'll tell you. edit: ; )
This issue can be solved by adding a ceiling check like the PlatformerController2d does. The game it was made for didn't have ceilings, so there was no need for such a check. If you're going to make a game with the FirstPersonController, or ony of the included stuff, you have to either be able to accept its limitations or create your own controller/modify this one. The purpose of the prefabs included with ursina is to be able to prototype fast, not to make the game for you.