[BUG] Character randomly teleports

Alright, either this is a weird bug, or my tiny brain can’t figure out what on earth I’ve done to cause this.

My player character randomly teleports up to several thousand units, sometimes appearing to be stopped by a wall and sometimes passing right through it. I have no teleportation system set up in this game, nor do I have a single Set Actor Location or Set Actor Transform node.

A few notes that might help track this down…

  1. The character can readily turn physics on and off for its capsule component, and teleporting (seems) only to happen after physics has been turned on at least once.
  2. Teleporting happens only when physics is turned off.
  3. The character almost always teleports to a point adjacent to one side of a wall or the other (testing this in a modified 3rd person example map, the main modification being a larger floor. Wall width is unmodified).
  4. This bug appeared the moment I switched to 4.10, with no other changes.
  5. At no point does the character’s velocity increase dramatically. In addition, no extra momentum appears to be gained by this teleportation.
  6. The player controller location does not change.
  7. The teleportation appears to happen instantly, and printing the actor location to screen has supported this hypothesis.
  8. The bug doesn’t always happen. Sometimes it occurs within a few seconds of starting play in editor, sometimes no matter how hard I try it won’t happen, even upon unloading and reloading the level.
  9. No C++ has been done on my part, everything has been set up via blueprints.

Anyone got a clue as to why this would happen? I’m happy to send more info if desired. Sorry there’s not a good “here’s how to replicate it” tutorial, if I can manage to make it happen in a default project (i.e. without a million steps to replicate) I’ll add that as well.


Hi NoahBeggs,

  • Can you show me screenshots of your players movement setup and the functionality you have set up for turning on/off physics?
  • Does there seem to be a specific location or object interaction this occurs with?
  • Are you setting World location/Rotation/Transform at any point in the actor blueprint?

Hi ,

Here are the movement component settings:

Movement setup for movement with physics off:

And the point where I toggle physics on and off (triggered by separate events):

The movement setup with physics on is pretty complex, so if you want that too just let me know how best to send it (loads of screenshots, a separate file, etc).

To answer your second question, as far as I can tell this occurs randomly regardless of position or interaction. The only regularity to it is that it only (so far) has happened after physics has been turned on and off, and that it tends to slap me right up against one side or the other of a wall.

And yes, I set world rotation after turning physics back on (see second screenshot). That is the only place I set rotation, location or transform.

I also just realized that there are some great debugging tools I haven’t utilized yet, so if anything funky pops up there I’ll add it as well.

Thanks for the help,

Small update: I’ve watched all of the input axis values, nothing is jumping out as abnormal. The velocity and acceleration also seem unaffected, it is only the location which has a sudden change in value.

Small update: I’ve watched all of the input axis values, nothing is jumping out as abnormal. The velocity and acceleration also seem unaffected, it is only the location which has a sudden change in value.

Unfortunately I think it would be best to send a test asset/project that I can see this in action in with detailed reproduction steps. This will allow me to assess what may be occurring.

No problemo, I’ll get one put together today. Thanks for your patience.

Unfortunately I am having trouble replicating this issue in a test project. I’ve made a default third person shooter project with level size increased and the offending functionality added to the default character. After further testing it also appears that this occurs only in the modified default level.

If you want, I can send you the default project with functionality added, as well as the full project if you really want it, but that would be a lot of blueprints and such to sift through for this silly bug. If you want either just tell me where to send it/ them (they’re too big to attach).

And if this needs to take the back burner/ the cupboard behind the burners/ the dumpster outside, don’t worry about it, I’m sure there’ll be a workaround if it becomes too much of an issue.

If you could, upload the project to a dedicated FTP service such as dropbox or google drive and either post the link here, or if privacy is a concern, send me the link on the forums (same account name as on here) and I’ll be happy to take a look and see what may be occurring.

Just sent you a link on the forums. Since I didn’t think to include this in the message, the replication steps should be as follows:

  1. Load the project
  2. Load level TestingGrounds
  3. Play in editor/ new viewport
  4. Click Spawn
  5. Move around with WASD and turn physics on/ off with Left Shift, easiest way to make the bug happen fast seems to be just mashing 'em all randomly
  6. If the character doesn’t teleport within 20 seconds or so, try quitting play in editor and starting from step 3 again

Let me know if there’s anything else you need. Thanks so much for taking a look at this, you are the bomb.

I think I may have found what is causing the problem you are seeing. It looks like the problem is stemming from your overlap prevention sphere incorrectly registering your skeletal meshes arms as overlapping actors, or it may simply be clipping the floor/walls/etc and causing the repulsion effect to fire which is rapidly launching your character. This is often seen when a physics actor is overlapping another actor and then activated. Check to make sure your overlap sphere encompasses the full skeletal mesh when you turn physics on and that the actor isn’t clipping another actor when you simulate physics. Let me know if you see the error again after having tried this.

Nuts, that’s not it. I set it to print “Overlap!” whenever the sphere in question began an overlap, and it didn’t fire upon teleporting (but did upon overlapping other actors). I also tried removing the sphere entirely, but it made no difference. That’s good to know though that it might register unintentional stuff, I’ll keep an eye out for that in the future.

See what makes me think it is a physics interaction issue is if you hold the shift key to roll into a ball but don’t move, you’ll see a slight bounce where the physics actor is interacting with the floor. That makes me think that there is something that is causing an explosive impulse reaction if it collides incorrectly. However, I can’t seem to find a direct correlation and it is very difficult to consistently reproduce. I will continue looking to see if I can find a cause.

Interesting, I’ll focus on the physics then, maybe by turning pieces off one by one the problematic node/ nodes will surface. Out of town today but I’ll get crackin’ on it tomorrow. Thanks again for your help.

Hi NoahBeggs,

Have you had a chance to take another look at this? Have you found what may be the cause of the error? I believe the error may still be limited to the physics interaction between the character and the surrounding actors.

I have, and oddly enough, seem to have fixed it. I’ll send you a link to the fixed project once it uploads to dropbox.

The exact cause remains elusive though, after much fiddling with it I took a break and updated the characters’ aiming so that they would aim at a camera trace hit. After that, the bug stopped occurring, which makes me think it may have had something to do with setting the rotation… but I don’t understand the underlying code enough to have a clue if that makes any sense.

Let me know if you want any more info for tracking this down.

Hi NoahBeggs,

I am happy to hear this is no longer occurring for you. Unfortunately I’ve been unable to find the cause of the error on my end. I am going to mark this as answered for tracking purposes. If this error occurs for you again, please comment here and I’ll be happy to take another look.

I have had this exact problem for an year now and I seem to have solved it by turning off:
“Run Physics with No controller”
This also had to do with stepping up on objects which were about to move up or down.