So when I started the process I finally broke down and added in a mechanic that most Arkane fans know as blink (Emily’s Far-Reach, Daud’s Time Blink, Billy’s Displacement, etc.). The technical implementation is relatively simple, you fire a ray cast from the camera to a forward trajectory from the center then at the end you are going to spawn some sort of indicator. Since this is inspired by a D&D campaign I decided to flavor mine as a Misty Step. Fog appears at the end of the trajectory. If the ray cast hits an object it spawns an indicator before that trajectory where it hits it. That indicator is then used as the target position which we will then translate the player's transform to creating a smooth transition from one point to the next.
In this time this player functionally is taken out of the physics simulation which is why the indicator itself needs to be out of the collision boxes of the level geometry. If we just place the indicator at the exact point where the ray cast hits geometry it will spawn the indicator inside or partially inside the geometry. It needs to be a certain distance above the ground, specifically half a player’s height, or a certain distance away from the ceiling. And in the case of corners it has to be a distance away from the walls as well this is a tricky balance because if the indicator is too far from its initial position it will feel imprecise. In general the distance from the ground that you should spawn the indicator and thus the player is half the player’s height plus point 25 meters.
0 Comments
Leave a Reply. |
Jed MyersDeveloper Archives
February 2021
|