nicholas-maltbie / PropHunt

PropHunt game attempt using Unity and the Data Oriented Technology Stack
MIT License
11 stars 0 forks source link

Interactable Object Detection #156

Closed nicholas-maltbie closed 3 years ago

nicholas-maltbie commented 3 years ago

Create the following components

Have a script associated with the PlayerView component that will highlight an object the player is looking at. The way this should be done is to draw a ray cast from the player's camera position (Computed from PlayerVeiw), have the raycast ignore the player itself (Using the SelfFilteringHitCollector), then detect if the object hit has a component called Interactable.

There should be a system to handle this that takes in a PlayerView and InteractFocus and draws a raycast from the player camera position in the direction the player is looking. Then the hit object should be marked in the InteractFocus component of the player.

There should also be a local (not associated with the server, client side only) feature associated with the Interactable object to mark if the object is focused.