adding another test to the proximity selector (facing angle)
Posted: Sat Oct 24, 2020 11:12 am
Hello,
I want to use the proximity selector in my game to be able to interact with usables because its the one that make the most sense compared to the raycast selector !
However, i would like to add a small feature to the proximity selector :
I want to check if the player is in the trigger AND facing the usable to be able to use it;
I would be interested to know what is the easiest and cleaniest way to implement that ? I have the whole logic for the facing part (using a Dot Product between player forward and usable forward), but im not sure where to put it
I tried creating a new component that disable/enable the usable when the player is not facing, it works but not perfectly
thank you !!
I want to use the proximity selector in my game to be able to interact with usables because its the one that make the most sense compared to the raycast selector !
However, i would like to add a small feature to the proximity selector :
I want to check if the player is in the trigger AND facing the usable to be able to use it;
I would be interested to know what is the easiest and cleaniest way to implement that ? I have the whole logic for the facing part (using a Dot Product between player forward and usable forward), but im not sure where to put it
I tried creating a new component that disable/enable the usable when the player is not facing, it works but not perfectly
thank you !!