Hi,
I have a door system working pretty well by stopping a timeline animation when it touches the player character, not knocking the camera around anymore.
However, I can think of scenarios where opening the door outwards, away from the player can be useful. I figure it could be done by having two colliders on each side of the door and checking our lighttrace to see what face we are facing. But then what?
I feel like using the camera’s world rotation and the door’s orientation in the current room, we should be able to give it a rotation that would open the door away from the player, into the new room with some fancy math. I am stuck at figuring out what that degree to rotate is. It is either 90 or -90 but which one depending on which side we are?
Thanks in advance!