Hey guys.
I'm currently trying to spawn a flat model at the location i'm looking at. (like for example a spray in counter-strike).
Everything is working fine so far, but i have a small problem.
The model should be spawned at a wall, floor or ceiling and for that i need the angle of whatever the player is looking at.
I'm currently using GetPlayerAngles() for that, but that does not realy work because the player would need to look perfectly at the wall.
If he is looking at the wall with less or more than 90° the model is not flat at the wall.
For that i need a small function that gets the angle of whatever you are looking at (wall, floor, ceiling) but i absolutly dont know how.
I think that should be possible if i try to get 3 points of what the player is looking at but thats all i have for now.
Does there any function exist that someones has created in the past that i could use or anything else that i could use to get started?