Hackable Action Figures Could Activate Their Abilities Through Walls


Author- Ethan Ortega 

Problem: When using the hackable action figure you could activate its ability on its target through walls. The way the old implementation was, you could activate its ability as long as the target was "in sight".  "In sight" means that the target would be in the view of the camera if everything was empty. The reason this wouldn't be ideal is it wouldn't check for walls or other visible objects in the way of the action figure and the target. So no matter the range and what was in front of the action figure, the player could activate its ability as long as the target was in sight. This was also causing a buildup of force and the target getting to places that the player couldn't reach to interact with.

Solution: To solve this, I decided to conduct a line trace. The line trace would check for visible objects between the action figure and the target. If a visible object was found and it was the actor, the action figure would be able to activate its ability. Also, I added a nullptr check to see if there was a valid actor since in the levels there are some temporary BSPs that would cause crashes at times. Now the ability only activates when the object is actually in the action figure's sight allowing the player to understand what they are doing while using the ability.

Leave a comment

Log in with itch.io to leave a comment.