Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PoC] Elevators
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#6
RE: [PoC] Elevators

One thing you could do is work out of the position of the player relative to some point of the elevator at the start of the elevator. Then, teleport the player's body to an area of the map which is identical to the elevator the player is in for the duration of the elevator ride.
However, instead of putting the camera on the player's head, use the player's offset from the off map position and the offset from the elevator initially to place the camera where the player would be if he was in the elevator.
Then at the end, just set the position of the player to where it should be given the camera's current position. That way you don't need to move the map around the elevator, you can simply move the elevator and update the camera once a frame for the duration of the ride.

Portal 2 used this approach for the opening sequence in the stasis room with it crashing into stuff iirc.
(This post was last modified: 10-27-2015, 06:21 PM by Apjjm.)
10-27-2015, 06:20 PM
Find


Messages In This Thread
[PoC] Elevators - by Abion47 - 10-26-2015, 09:42 AM
RE: [PoC] Elevators - by Romulator - 10-26-2015, 11:11 AM
RE: [PoC] Elevators - by Abion47 - 10-26-2015, 11:57 AM
RE: [PoC] Elevators - by jens - 10-26-2015, 11:29 AM
RE: [PoC] Elevators - by Romulator - 10-26-2015, 12:59 PM
RE: [PoC] Elevators - by Apjjm - 10-27-2015, 06:20 PM
RE: [PoC] Elevators - by Abion47 - 10-27-2015, 11:08 PM



Users browsing this thread: 4 Guest(s)