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
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#7
RE: [PoC] Elevators

That is the exact approach used in the second category I talked about above. In fact, there are a couple of Entity functions available in the HPL3 API to enable that kind of behavior. First is the Entity_GetDeltaToEntity function, which gets the offset of one entity relative to another in the form of a cVector3f. Then an overloaded version of the Entity_PlaceAtEntity function allows using that offset to move an entity to a position that would put it at the same relative offset. It's implemented in the way that, at the start of the Sequence step where the elevator is triggered to move, the delta is calculated between the player and the elevator, then during each Update step, that delta is used to put the player in the same position relative to the elevator.

And that's the approach that has the side-effect of overriding player input in such a way that during the elevator ride all they can do is look around, which is why during the times in SOMA that used this approach, the player was given a story-based reason to not be able to move. (e.g. Being strapped into the chair during the descent into the abyss.)

I suspect there might be a way to achieve player motion during the elevator ride, but it would involve changing up the logic behind handling player input, which for my PoC maps wasn't something I wanted to mess with, but might be something I look into later down the line. (And I haven't had a thorough look into the files that handle regular movement yet, so for all I know that part of the code might be locked behind the API wall.)
10-27-2015, 11:08 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: 1 Guest(s)