Hello to all UE4 community!
I have a model of a circuit breaker (like a big box) that has interactive components that the player interacts like a front door, a back door and a couple of buttons and switches inside the doors. I have to identify what component the player is focusing. To do this, I put simple shapes around the interactive components, created a custom trace channel called “interactive components” and set these shapes to belong to this channel. Then I use a raycast from the camera to identify what interactive component is focused by the player.
First question is: This is the best way to do this?
A problem is: let´s say that the player is looking next to the side of the front door. Then, the raycast crosses the body of the model and hits the back door, and I don´t want this behavior. I´m thinking to create another trace channel and simple shapes to only block the raycast and prevent it to cross other parts of the model and hit unwanted components, like this example.
Second question also is: This is the best way to do this?
Thanks to all and sorry for my English,