Teleporter Orientation problem

Tutorials and discussions about Mapping - Introduce your own ones!
Post Reply
TheRoel-R
Novice
Posts: 28
Joined: Fri Aug 31, 2012 12:46 pm

Teleporter Orientation problem

Post by TheRoel-R »

Hello,

I seem to be having a problem with teleporters on a map I am currently working on.

Testing the map offline there is absolutely no problem, when you enter the teleporter you come out facing the way I want it to. However, when testing the map on a dedicated server, on some (so not all) of the teletorters the orientation is completely messed up, it is rotated by like 90 or 180 degrees. As the map is a Bunnytrack map and the orientation is vitally important for some of the obstacles, this is not really something I can live with. I have already tried replacing the teleporters by fresh ones, or moving them around a little, no success.

Note that I have used a custom teleporter class that can be found here: http://wiki.beyondunreal.com/Legacy:DelayedTeleporter, but it happens on both 'normal' and custom teleporters, so I don't think the problem can be there.

Does anyone know a solution?
User avatar
Feralidragon
Godlike
Posts: 5493
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Teleporter Orientation problem

Post by Feralidragon »

Never heard of such problem before... Make the following experiment: select all the teleporters, and go to their properties > Advanced > bAlwaysRelevant and set it to True.
TheRoel-R
Novice
Posts: 28
Joined: Fri Aug 31, 2012 12:46 pm

Re: Teleporter Orientation problem

Post by TheRoel-R »

Ok, that seems to have fixed the problem with the normal teleporters.

However, for some reason the DelayedTeleporters suddenly seem broken. I use them to get a fixed exit direction (which is one of the properties of that tele). But for 4/5 of the teleporters I have this fails on a dedicated server (it works offline though). It is kinda weird that one tele is completely fine, maybe there is a bug in that script or something?
User avatar
Rakiayn
Masterful
Posts: 550
Joined: Fri Aug 28, 2009 3:33 pm

Re: Teleporter Orientation problem

Post by Rakiayn »

maybe it is a problem with their properties since you already placed them in game.
maybe try placing new one and see how they work?
TheRoel-R
Novice
Posts: 28
Joined: Fri Aug 31, 2012 12:46 pm

Re: Teleporter Orientation problem

Post by TheRoel-R »

I fixed it. It seems that the fixed direction does not work when when you get teleported when the state of the teleoprter changes from disabled to enabled. Worked around it by attaching the teleporter to a mover and moving the teleporter in place when it should be enabled.

Thanks for the help!
ShaiHulud
Adept
Posts: 459
Joined: Sat Dec 22, 2012 6:37 am

Re: Teleporter Orientation problem

Post by ShaiHulud »

Performing some pretty advanced necromancy here. But I came across this problem in a map I'm creating (my first), and I found the solution by stealing from the UT2004 codebase. There's one line that changes everything:

Pawn(Incoming).ClientSetRotation(newRot);

If you look in the teleporter class, you'll find the right place to put this (in a sub-class) inside of the "accept" function. It goes in this segment:

Code: Select all

if ( (Role == ROLE_Authority) 
        || (Level.TimeSeconds - LastFired > 0.5) )
{
  Pawn(Incoming).SetRotation(newRot);
  Pawn(Incoming).ViewRotation = newRot;
  // insert the line above hereabouts
  LastFired = Level.TimeSeconds;
}
User avatar
EvilGrins
Godlike
Posts: 9698
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA
Contact:

Re: Teleporter Orientation problem

Post by EvilGrins »

TheRoel-R wrote: Fri Aug 31, 2012 1:07 pmDoes anyone know a solution?
Turn it.

Literally, turn the direction of the output teleport... just like you'd turn anything else on a map.
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758
User avatar
_21
Average
Posts: 69
Joined: Mon Aug 30, 2021 10:51 am

Re: Teleporter Orientation problem

Post by _21 »

@ShaiHulud: Thanks for sharing your findings. I've been scratching my head over this problem for a long time. If the rotation is 180 then it's possible that the teleported will throw you out because of the orientation desync. Just the orientation is one thing. There also a nasty teleport delay depending on your ping. The worst side-effects are quite game breaking: players can get teleported on server side but not teleported on client side. To find out if this happened to you should see after a few seconds all actors get despawned due to replication because the server thinks you're in a completely different side of the map.

There is also a rendering issue, the visible teleporter is rendered 2x times. This becomes super noticeable if the animation loop desyncs between the 2 renders, you'll see 8 stripes instead of 4. In offline mode they just happen to perfectly overlap, so the only effect is that the teleporter is brighter.

@EvilGrins: Turning does not help with the fact that the stock VisibleTeleporter has a HUGE replication bug. In fact, its better to not turn it because then at least both online and offline you'll get the correct orientation.

To anyone else reading this: use static teleporters! Like the one found on DM-Deck16][ and DM-Liandri, they work perfectly! You can even customize how they look.
Buggie
Godlike
Posts: 2733
Joined: Sat Mar 21, 2020 5:32 am

Re: Teleporter Orientation problem

Post by Buggie »

For real fix this problem, all teleporters must be bNoDelete and teleporters with same tag must be rotate in same direction.

If teleporters can be turn on and off, then it must be also bAlwaysRelevant.
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Teleporter Orientation problem

Post by sektor2111 »

Because
viewtopic.php?f=5&t=14809&start=30#p135599
as it's already shown, VisibleTeleporter is a BAD class, client will re-create another Teleporter if that is not marked at least bNoDelete (in order to perform animations).
Also in server if Teleporters are "fixed" with a TeleporterFix whatever, there are chances to have copies turned different than original from map due to "Spawn" conditions. If Teleporter stays untouched (bNoDelete exactly like a LiftCenter), client will have original Teleporter with original rotation.
Post Reply