# Thread: Formula to find an angle that can change.

1. ## Formula to find an angle that can change.

This is probably really simple but I can't get my head around it. I am making portals for college and need to set the players rotation to the angle they are looking in when they teleport. Since portals can be rotated from 0 to 360 in the yaw, the angle they are looking in is different to what they are seeing out. There are two examples, one with the portals facing opposite directions and one with a portal turned 90 degrees to the other.
I can get the angle X and Y by getting the objects' rotations, but since these values change I need to have the method to get Z as a formula. I've tried my best to draw it out for a visual.
Thanks for any help.

2. ## Re: Formula to find an angle that can change.

https://www.freemathhelp.com/forum/t...change.115871/

It seems you are not going to show any of your own efforts.
Posting the same question in multiple locations says, "My time is more valuable than yours." Is that the message you want to be giving to volunteers?

Give us a clue where you are.