|
Having a very strange problem, here. I'm creating an object via The code I'm using is just The log traces (8, 0, 0) as you'd expect, but if I trace the cross's position on the next frame, it'll show (0, 0, 0) again. It's like there's a script that's resetting the object's position to (0, 0, 0) every frame, although that's certainly not happening in any of the scripts I'm using. (I'm just starting a new project, there's only a few dozen LOC to check). Setting rotation also doesn't work. And after around ten seconds have passed since instantiation, I can manipulate the transform in code or in the editor without any problems. Instantiating another object will mean I have to wait another ten seconds until the second object can be moved around, while the first one still moves fine. If it's relevant, if I parent the newly-instantiated object to an existing transform, and move that parent transform, it works okay. It's just the local transforms of newly-instantiated objects. The prefabs I'm instantiating are just empty objects with a model attached, with no extra scripting at all. The model is imported from Blender (straight from a .blend file). Is there anything that might be causing this? I feel like I must be missing something obvious.
(comments are locked)
|
|
Figured it out, kind of. The models I was importing didn't have any animations attached, but an animation component was still being added and "Play Automatically" was checked. I guess it was playing some default animation over ~10 seconds, and that was somehow causing the transform to be reset for that duration.
(comments are locked)
|
