What are we talking about here? Let’s illustrate with a small tangent first: Imagine the portals are facing each other in a ‘trap’ (so from the outside or ‘back’, they appear invisible as in the spell text).
narrow corridor: ::::|<-:::->|:::::
The arrows indicate the direction one may enter the portal. Clearly if this was a ‘real’ physical situation like a StarGate(tm), a creature would enter from the left side through the leftmost portal (which is invisible from the left, according to the spell’s wording). Once it passes through, it is stuck in a trap that it cannot escape, assuming the corridor is perfectly a 10ft-diameter circle. (If you open it in a bigger corridor, then the creature might be able to Squeeze by.)
What happens if the gates are placed extremely close together? There are two ways to model the gate:
- “linked doorways” scenario — If a creature sticks its arm through and the portal powers off, and the creature doesn’t make a check of some sort, the creature loses its arm. If this was the case, an oversized vehicle would merely not pass through (and would experience really painful sheer forces if it was going in at high speed). In this scenario, a creature could ‘feel’ through to the other side, and might be unable to move through if there was something blocking the exit portal (DM might rule differently for enemy creatures blocking the portal, since that kind of blocking is somewhat different than physical blocking).
- This is likely the scenario (unless GM rules otherwise), as evidenced (slightly) by the spell description: “Any creature or object entering the portal exits from the other portal as if the two were adjacent to each other”, and thus rulings should (absent strange edge cases) assume the squares/hexes are effectively adjacent to each other (and merely obscured in mist) for the purposes of things like “can you AoO / Opportunity Attack creatures through an Arcane Gate if you have Blindsense”, “do Arcane Gates provide Cover”, or “can an Arcane Gate cause adjacency to help enable a Sneak Attack”, barring GM modification.
- “infinite repeated teleports” — If a creature sticks its arm through, nothing happens; either the entire creature goes through (moves into the next space), or the entire creature does not. The Arcane Gate rings are specifically filled with mist, so the DM must decide how the gates function: does stepping through merely cast something like a Dimension Door spell for each thing that goes through, or are the two areas linked in spacetime (sort of like case #1), and merely covered with mist. The flavoring seems to imply the former, but this is probably up to the DM. This scenario may give rise to some funny edge cases, depending on whether the DM rules the edges of the portal are solid or not… if not, then a vehicle might pass through while its passengers might teleport (perhaps desirable).
Thus going back to the modified situation where the portals are facing each other, but squeezed really tight together e.g. <2ft:
narrow corridor: ::::||:::::. In case #1 (“linked doorways”), it has put part of its body through an invisible finger-trap (the first gate). Does the creature run through its own organs if it continues?
Consider that in D&D 5e, no spells really affect the insides of a creature’s body. You can’t summon icicles into an enemy’s brain, or teleport the dragon’s heart outside its body (except necromancy and some other schools). Thus (unless your DM says otherwise) it would be quite against the spirit of the system (and also quite broken) if this was an insta-kill. However, this doesn’t mean that 5e doesn’t account for this kind of aggravated / internal damage.
- Dimension Door: “If you would arrive in a place already occupied by an object or a creature, you and any creature traveling with you each take 4d6 force damage, and the spell fails to Teleport you.”
- Teleport: “Mishap: The spell’s unpredictable magic results in a difficult journey. Each teleporting creature (or the target object) takes 3d10 force damage and the DM rerolls on the table to see where you wind up (multiple Mishaps can occur, dealing damage each time).” (in 3.5e, this explicitly said you were “scrambled”)
(This would also be 5e’s answer to the ladder paradox.)
If the DM rules that Arcane Gate works like in case #1 (linked doorways), then the teleporting creature would take failed-teleport ‘scramble’ damage (it would not take it twice; typically only teleporting creatures take damage, not whoever they’re teleporting onto), and either fail to teleport, or randomly teleport to somewhere adjacent or fairly close. A DM might possibly rule you may escape the trap by taking this damage.
The full ‘algorithm’ would be as follows:
- If the creature tries to move through, it will be able to feel the other side (and be blocked by an enemy NPC (possibly), or by a wall, on the other side).
- If the gate is set up in a trap overlapping the creature, then if the creature tries to move through itself anyway (if it isn’t paying attention…), it probably takes “scramble” damage as above and may probably leave the way it came.
- Spells (which don’t have “that you can see” wording) may possibly be cast through the gate, subject to DM discretion.
If it’s case #2 (infinite repeated teleports), in the trap scenario, then the creature would fail to teleport, because there is no space on the other side (it is blocking itself), so would just pass through the portal. Alternatively, the DM might rule that the creature does not block itself (so it would be stuck in an infinite teleport loop that it could trivially escape from).
- If the creature tries to move through, one of three things will happen:
- If there is a large physical obstruction, it will take “scramble” damage, and either fail to teleport or succeed. DM might instead say scramble damage does not exist and the portal just fails to work.
- If there is a hostile creature blocking the other it, it might take “scramble” damage, and either fail to teleport or succeed. DM might alternatively say scramble damage does not exist and th portal just fails to work (or works and shunts you to a nearby square as you tumble across the enemy square).
- If the teleporting creature itself is on the other side, it will just teleport constantly (but can exit the trap without damage), or DM might alternatively say nothing will happen and it can just move through the portals.
- Spells may not be cast through this.
The text says one can rotate the gate… is this allowed if it makes exit impossible?
That would be up to the GM, but for consistency, the answer should be “yes it can” if the DM allows portals in small corridors (which opens up weird scenarios, e.g. Arcane Gate-teleporting Tiny creatures having great advantage if they can make Tiny portals by intersecting them with walls). The answer should be “no it can’t, at least not without winking out of existince” if the DM disallows portals if there is insufficient room.
Whether Arcane Gates can be spawned such that they intersect walls is in the scope of a separate question.
If you partially walk through a gate in the backwards direction, can you ‘back out’ in the direction you came from?
Yes in scenario #2, not without scramble damage in scenario #1.