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.
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.
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.
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?
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.