I am currently working on a tripmine deploying SWEP and have run into a hiccup.
On spawning the tripmine, the angles are set to the Hitnormal of the Trace Result from the player’s eyes to always ensure it faces away from the surface they were deploying on.
However the tripmine by default will always face 90 degrees to the left instead of straight at the player.
Any hard corrections made will cause the tripmine to face correctly when placed on walls but then face incorrectly when placed on the ground / ceiling and vice versa.
What I am wondering is if there is a way to rotate an entity based on IT’S angles, rather than the WORLD’s angles. Because I need the entity to be rotated 90 degrees to IT"S right.
Apologies if this does not seem to make any sense, I’m a touch tired (and frustrated) from going at this all day and to no avail.
Thank you for your time.