Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Objects randomly spawning at origin on scene startup

Discussion in 'Physics' started by AntoineDesbiens, Sep 21, 2015.

  1. AntoineDesbiens

    AntoineDesbiens

    Joined:
    Jun 9, 2014
    Posts:
    840
    Once in a while, say once every 6-7 times, I start a scene in the editor, although it seems pretty random, one of my prefab likes to randomly pop at (0, 0, 0) and ignore physics.

    This happens even when the game object is completely stripped of all its components, beside a sprite renderer and a rigidbody2D. This happens with or without colliders, they don't seem to have an impact on the issue. There are no scripts interacting with the object.

    I've tried toying with the rigidbody2d parameters to find out what's causing it. It seems the problem only occurs when the rb is set to kinematic or when freeze position x or y is ticked.

    As for the physics 2d options, everything is still set to default, except "raycast hit triggers" and "raycast start in colliders" that aren't checked anymore.

    Time options are modified in the following way:
    Fixed timestep : 0.01666667
    Max allowed timestep : 0.01666667

    This happens in multiple scenes using the prefab.

    Honestly I don't even know where to look, I don't understand the issue at all. Help!
     
  2. HiddenMonk

    HiddenMonk

    Joined:
    Dec 19, 2014
    Posts:
    985
  3. AntoineDesbiens

    AntoineDesbiens

    Joined:
    Jun 9, 2014
    Posts:
    840
    HiddenMonk likes this.
unityunity