Posts: 1,079
Threads: 199
Joined: Jun 2013
Reputation:
0
I don't know what to do here, I have 2 portals. When a player enters the first portal, their velocity is saved and given to them on the exit portal, but the exit portal changes facing angle, while the velocity continues from the entrance portal. Is there a way to get the facing angle of the exit portal, then set their x and y velocity to exit straight from the exit portal? My assumption is that it's a math problem, but IDK where to start.
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
I'm not sure but I know Nero3D would know what to do but I'm pretty sure atan2() is involved somewhere here.
Posts: 734
Threads: 8
Joined: Jun 2009
You're trying to recreate the game "Portal" right? Unfortunately I never played it or heard about it so I dunno what you mean by "changing player facing angle on exit portal" but if those portals are like you "drop from a ceiling onto a platform", then the only way I guess would be getting that platforms landing XYZ and determine the angle difference (actually coordinates to get the angle) from the portals XYZ from where you start to "drop" and the platforms XYZ where you land. I don't believe there's any other way AFAIK.
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
Nero is on now, can you look at this Nero_3D ?
Posts: 2,856
Threads: 6
Joined: Jun 2007
Reputation:
0
The truth is I can't help here, I have no experience with rotations of objects
I think if you want to solve that problem you should get the difference of the rotations from both objects and rotate the incoming vector from the first portal with rotation matrixes to match the exit portal
Posts: 1,079
Threads: 199
Joined: Jun 2013
Reputation:
0
That sounds about right. I'll get to it.