- Home /
GameObject shifts on it's own
So I haven't actually found this ANYWHERE no matter how hard i research it.
Anyway, little bit of backstory: i'm working on a city type map for my game. Everything's going fine, until one day all of a sudden the physics just go crazy. My character ends up floating, and if they actually touch the floor instead of going all jesus, they fall through it.
First thought in my mind was that it was a physics bug, but i've experimented alot and found that it's actually something way weirder, which was that the ground itself was just moving on it's own.
The thing that's even crazier, however, is that it's not just me. I've never actually made any scripts which move the ground in any way, and the ground is static anyway, so it won't even work.
I've even went as far as to recreate the entire terrain, but it still has the same issue, WITH THE SAME EXACT TERRAIN PIECE. I've even tried renaming it, but to no avail. I'm quite literally ripping my hair out.
EDITOR: https://drive.google.com/open?id=1mJSA7QCDksdU5_HYZ68KFqn82p5hvGYG
RUNTIME: https://drive.google.com/open?id=18qY700spWvCYkcQlYgYhx5qSAxw09IPZ
Thank you :)
In what direction is the ground moving? And what components does it have attached?
there isn't any component besides anything you'd get from a cube. just a box collider, mesh filter, and renderer.
as for which direction, from the picture it's definitely moving to the right, but it's also moving up (hence why the character is floating)
Answer by DigitalCyclone · Feb 15, 2020 at 03:08 PM
FOUND THE ISSUE!
Apparently it was actually my fault. The teleportation scripts (which teleport the player out of the tunnel if they walk in) apparently worked on the terrain aswell....for some reason?
Lesson learned: if you have triggers, be VERY careful of them when they come in contact with the ground or anything you don't want to be affected by them.
Your answer
Follow this Question
Related Questions
Enable/Disable a Static object 1 Answer
Problem moving static batch root when using StaticBatchingUtility.Combine 1 Answer
can i change a variable from non-static to static at runtime in c#? 1 Answer
Export objects to a .3DS file at runtime 1 Answer
Baking shadow maps for static objects spawned at runtime 0 Answers