Hey there
I'm currently trying to recreate my portal mod. Everything is working fine so far, but i have a small problem.
I'm trying to spawn my portal model at a wall or at the floor/ceiling and thats working, but its not the right angle.
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 i'm looking at but thats all i have for now.
Does there any function exist that someone has created in the past that i could use or anything else that i could use to get started?

Sorry for my bad english, i hope its not to hard to understand.