P0-B7: Part 1401: Debugging, Improvements
by PhoenixGames on Apr.21, 2024, under Astral Realms, P-0, P0_B7, Software and Games, Spirit of the Stars, Spiritus Astrum
I have found, and fixed, a tricky issue with the physics system in the project.
I was have issues with raycasts intermittently failing.
The cause turned out to be objects with rigidbodies attached that were far from the origin.
However, in unity, rigidbodies cannot be disabled, so I had to remove the rigidbodies when the object was far from the player, and then add them again, and setup their parameters, when the player got closer.
This was a relatively easy solution, but discovering the problem was complex.
I also made some improvements to the inventory system, and to the player server.