AndrewJLe / Project-Z

0 stars 0 forks source link

Implement Raycasting for Humanoid and Zomboid Detection #2

Open AndrewJLe opened 1 year ago

AndrewJLe commented 1 year ago

Humanoids and zomboids currently detect each other using a transparent circular sensor on top of their physical bodies. However, this implementation allows them to see through terrain and walls, which we do not want. To block their line of sight with obstacles, we need to replace the sensors with raycasting. In this revised system, the humanoids and zomboids will emit rays in a 360-degree radius around them. The length of the rays will be determined by their vision range, and if an object (such as a wall, humanoid, or zomboid) is detected, the system will return that information.