by Graf Zahl » Thu Apr 07, 2016 10:11 am
That's all not really surprising with the physics. You need at least as much space behind the portal as the actor can travel at most. For a player that's approx. 40 map units. The biggest problem is the sliding code which just cannot work with portals and is responsible for both glitches you experienced.
The player sprite glitch is another of those things that are more complicated than they look. It's really not easy to decide whether the player is crossing the portal or just looking at himself from somewhere else. The first case must hide the sprite, the second one must show it.
And the camera interpolation code for portals is messy enough already, but it has to track even more info that it already does.
That's all not really surprising with the physics. You need at least as much space behind the portal as the actor can travel at most. For a player that's approx. 40 map units. The biggest problem is the sliding code which just cannot work with portals and is responsible for both glitches you experienced.
The player sprite glitch is another of those things that are more complicated than they look. It's really not easy to decide whether the player is crossing the portal or just looking at himself from somewhere else. The first case must hide the sprite, the second one must show it.
And the camera interpolation code for portals is messy enough already, but it has to track even more info that it already does.