nickworks / TreeOfLife

This is a game being developed by DAGD students.
2 stars 1 forks source link

Raft fully implemented for 3D #80

Closed Nate41223 closed 6 years ago

Nate41223 commented 6 years ago

I reworked the Rafts script to fully work with 3D

Rafts are now Raycasting in the correct areas to detect water edges. 3D bounds seem to calculate min and max bounds incorrectly when the object's rotation is not on 0, 90, 180, and 270. Because of this, I use empty game objects, as a child object of the raft, to determine which points in space to cast my rays from. As long as the empty game objects stay child objects of the raft, they will stay aligned with its edges. -Note- Feedback would be appreciated about this solution and if anyone else has ran into the same issue with bounding box calculations within the script.

Completely reworked how the raft determines which direction to allow movement when moving back onto water in 3D space.

The Raft Prefab was also updated to accommodate the new changes