P-152: Virtual World Concept Update 151: Planet-sized Terrain: Part 30
I have managed to fix the problem that I was having with the 3D gravity code. This was caused by some legacy code that I had included as part of a previous attempt to fix the problem, and was not actually related to the new code that I had added.
I also ran into another slight problem when integrating the new gravity code with the existing terrain system. The player was being pulled towards the center of the screen, however, I have scaled the node positions from 64-bit coordinates to 32-bit coordinates, so their positions in 10k space do not match the center of the world. This resulted in the player being pulled to the wrong location, essentially.
I hardcoded an offset into the gravity vector, which works fine, but it only works when the player is standing on the Positive Z axis, I will need to come up with a better solution to this at some point.
I also managed to implement raycast-based collision into the terrain. I was surprised that this only took a day, but it turned out to be easier than I thought. I can now perform collision on the current collision list from Players, Aiplayers, and raycasting. I will need to extend this to vehicles and items in the future, but raycast collision alone is enough for now. I will use raycasting to create a simple shape replicator, probably a script based one, so that I can finally start placing some objects on the terrain.
The next goal is to re-implement the first person performance optimisations that I had disabled for testing.
P152_DEBUG
08/08/2016 , 07:28:43 PM
Torque 3D MIT – P152

09/08/2016 , 04:29:20 AM
Torque 3D MIT – P152
I placed this model using a raycast collision check.

08/08/2016 , 11:07:35 PM
Torque 3D MIT – P152
AiPlayers inherit from the same classes as Players, so the existing collision system works for them too.

08/08/2016 , 11:07:22 PM
Torque 3D MIT – P152

08/08/2016 , 11:07:05 PM
Torque 3D MIT – P152

08/08/2016 , 10:27:50 PM
Torque 3D MIT – P152

08/08/2016 , 10:26:38 PM
Torque 3D MIT – P152

08/08/2016 , 10:26:32 PM
Torque 3D MIT – P152

