We will entertain your mind, enhance your brain, expand your lifestyle.

Real-time Reflections

There are a few features we’ve added to go along with the elevator sequence we wrote about in previous article.

The first is controlling the elevator gate lamps and the lighting inside the cargo. When the player enters the operation area, the lights turn on, and when they leave the area, they turn off. This was easily implemented within the state machine transitions.

The second is what happens when a player enters an active door-operation area. If the door is closing, it needs to be stopped and reopened. This can be handled by a state transition triggered by an event when the door enters or exits the area, but the logic for opening and closing the door required the addition of actions to interrupt and return the action.

The third is control of the reflection of the cargo’s wall (glass) when riding in an elevator. Until now, fixed reflection probes were used for reflections from windows and other objects, so there was no sense of incongruity. However, when riding in an elevator and moving up and down, the image to be reflected also needs to move. For this reason, we used real-time updates of reflection probes for the first time. This eliminates the sense of incongruity in reflections, but it places a heavy load on the system, so we only included update control while the cargo is moving in the elevator sequence.

All of the above could be successfully incorporated into the state machine transitions, allowing for smooth development.