Why does my player/camera/map spin like a propeller the first 1-2 times after playing it in the editor?

So this has been going on for awhile, but I haven’t cared enough to make an issue of it.

My player spawns into the world and is moved to a location that is central and above where my map is spawned.

The first 1-2 times that I hit play after starting the editor, I spawn in the usual place looking down on my map, but the entire map is spinning like crazy. It doesn’t always do after editor start and it generally clears up and works perfectly fine every other load beyond the first couple. I have never had to restart the editor to fix this problem, I just hit escape and then hit play again and it just works.

I wonder if this could be another Array related problem where my arrays load the game with information already in them as has happened before. I don’t know how that could cause the spinning but I am out of ideas otherwise.

Anyone have any ideas?

Anyone got a clue?

Do you have a controller plugged in to your computer? I’ve encountered a similar problem where having a controller plugged in and starting the map results in my looking down and my character spinning around.

I do have a gamepad plugged in, but I don’t have any input mappings for player rotation.

If it is the gamepad there is definitely a bug at work here, though I don’t know why the game would rotate when that isn’t something that is setup in any way.

This is still happening.

Specifically, I changed the brightness of the sun and hit build. Then I hit play. Then things got intense… :stuck_out_tongue:

Also, there are cases of this problem where, as I spin, if I move the character the map splits into 2 blinking mirror images which move opposite of each other as I move around.

A long shot but are you “dying”? Was a big problem in ue3 with having your pawn below the Killz (maybe your map has gotten out of wack or your killZ is set too high). Could also happen if you spawn inside another actor maybe.

No, not dying. Just starting the game.

I do teleport my character to a specific location above the map right at the start, but there is no rotation component with that teleport.

The only thing he can run into is the hollow collision box that keeps him inside the map area, but he isn’t spawning anywhere near the edges of that box.

If I am hitting the hollow collision box, wouldn’t moving off of the box stop the problem? I can move all around the map but it won’t stop being crazy until I end the game and restart one or more times.

I was messing around with the light source/sun in the level and every time I hit play afterwards it would do the crazy spinning thing. In this case, it wouldn’t go back to normal until I either restarted the editor or break/compile my player controller:

If I disconnect the event and reconnect it, it pretty reliably stops the spinning the next time I hit play. I still don’t know why it is happening though.

I should note the view is spinning on the X axis and seems to be spinning centered on some point in the world. My level is pretty empty with just the starter content, a hollow box, and 2 trigger volumes. Then my map spawns in when I do.

Is there a better way to set initial player location or some other way to figure out what is wrong?

Have you tried using Teleport instead of Set Actor Location and Rotation?

Huh, I should have thought of that earlier since I am already using it elsewhere… :stuck_out_tongue: It is practically the same node though, except Set Actor has the Sweep boolean, whatever that does.

I will accept yours as an answer and come back later if it comes back, thanks!

It seems similar but the underlying functionality of teleport is quite different i think.

And sweep being true will test from the starting position to the end position and see if there are any collidable object between. It will stopm the object at the collision point. So if i set my location on the other side of a wall with sweep on it will only move to the wall as without it the object appears on the other side.

Well, I just had one of those spinning events using teleport so that rules that out…