Search Issue Tracker

Active

Votes

25

Found in

2017.2.0f3

Issue ID

962315

Regression

No

Colliders are not updating to match attached gameObject location

Physics

-

-

Priority: 7Not yet prioritized for a release

-

Severity: 2No workaround

Colliders are not updating to match attached gameObject location. After their object is stored and returned from a pool (reparenting, deactivating and re-activating the gameObject in the process) they become stuck at the location they were at when first activated. The collider gizmo does not reflect this.

To reproduce:

1. Download attached project "WoP Bugreport.zip" and open in Unity
2. Open "bug_example" scene and enter Play mode
Note: Enable gizmos in the game view for better visual cues to raycasting
3. Using a gamepad navigate the player character to the weapon on the ground and pick it up using the 'B' button (XBOX controller)
4. Use the 'X' button (XBOX controller) to fire the weapon at the enemy, killing them and causing them to return to the pool.

Notes:
- The enemies spawn one at a time from a pool of 10 total.
- After the 10th enemy has been dispatched they will start recycling. At this point observe that both the aim assist feature and the collision of projectiles confirm the enemy's collider remains at their initial spawn point as they move about.
- By selecting the enemy in the hierarchy and disabling/enabling their sphere collider, observe that it moves to the latest position of the game object but does not update.
- Workaround: By adjusting any property of the sphere collider, observe that the collider now begins to follow the game object as would normally be expected
- This issue appears on Unity Editor and Standalone Build

Reproduced on Unity 2017.2.0f3 and 2017.2.0p1
Not reproduced on Unity 2018.1.0a2
Could not check for regression on Unity 2017.1 and 2017.3 because XBOX Controller does not work for some reason

Comments (4)

  1. Cf6b5fe65003462019bf81c66f4892bb?d=mm

    BurningToad

    Nov 15, 2017 22:21

    Hello! I think this issue was just fixed in 2017.2.0p2 - see this related issue that was marked fixed in the patch notes. It solved my problems related to this:
    https://issuetracker.unity3d.com/issues/moving-a-collider-via-script-does-not-update-its-position-if-it-was-disabled-on-start-and-enabled-after

  2. 4339a66f908c846685f69c81f7b7cb0b?d=mm

    Razouille

    Nov 09, 2017 13:17

    EDIT : my workaround is to add a Rigidbody component on it with "Is Kinematic" checked, but I would like to avoid that, as it was working before

  3. 4339a66f908c846685f69c81f7b7cb0b?d=mm

    Razouille

    Nov 09, 2017 13:12

    Same thing happening for me, I don't even change the parent, just disable then enable few moment later the component, then when rotating the object the collider wont follow it unless I change some parameter in the collider component (using BoxCollider).

  4. 4835e22f022401fe99f3e6fdd360f5f9?d=mm

    MrCool92

    Oct 30, 2017 10:27

    same thing happens with 3D physics...

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.