UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Get angle of wall

broken avatar :(
Created 10 years ago
by Backslash
0 Members and 1 Guest are viewing this topic.
761 views
broken avatar :(
×
broken avatar :(
Location: de
Date Registered: 1 October 2016
Last active: 10 years ago
Posts
2
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
×
Backslash's Groups
Backslash's Contact & Social Links
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?

 
Loading ...