Search Issue Tracker

Not Reproducible

Votes

36

Found in

2017.2.0f3

Issue ID

962315

Regression

No

Colliders are not updating to match attached gameObject location

Physics

-

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 (38)

  1. 2de819ee0177299730a8d8c1d9bd9594?d=mm

    4tzer

    Mar 05, 2020 08:41

    2019.2.9f1: This issue was driving me nuts. Updating the centre of the Collider resolved it. Odd to read that it's not reproducable.

  2. 62394aafcc3672097c427b2799844bc6?d=mm

    rwetzold

    Jan 17, 2020 12:48

    I suspect I am stumbling into the same issue right now with 2019.3.f5. It seems somehow like the colliders are not updated at the same time as the game object is resized but slightly later. I am not at the bottom of the issue though yet.

  3. A13c5164a4bc05dad3ea3e5b2f262dda?d=mm

    Gandarufu

    Dec 08, 2019 13:35

    Still having the same issue in 2019.3 and yet his issue is closed and marked as resolved? For some reason colliders don't update when you move the gameobject, but stay in their original spot.

  4. C9117d72add794bf2aa3eb8dad64c69d?d=mm

    danUnity

    Dec 01, 2019 01:43

    I still have the issue where if I scale a game object with a collider on it. The collider stays at the same size. I'm using unity 2019.2.0f1. Not sure why we can't vote for it even if it's not reproducible. If we still have the issue, we should still be able to vote...

  5. C4f48f1e95e9e7702df9b06ffa8f4a56?d=mm

    stewe02

    Nov 15, 2019 16:55

    I'm having the same problem on unity 2019.2.6f1
    What should I do ?

  6. 688eb0bf92fe163c24513e7ddc3b1147?d=mm

    m4a44

    Apr 05, 2019 14:25

    Just had this where a child object with a kinematic trigger collider and rigidbody (not moved, except by collider and rigidbody on parent) wasn't updating the physics transform.

    Using "transform.localPosition = transform.localPosition;" in the update fixed it for me.

  7. 278668fbe1cea09c019035c184471138?d=mm

    CookieSalad

    Oct 02, 2018 14:38

    Hey everyone!

    If you're able to reproduce the issue, please consider using the Unity Bug Reporting tool and sending us a small repro project. The current one that we have access to is neither debuggable, nor strippable and we weren't able to reproduce the issue internally by creating a simple repro project ourselves.

    Send us as many projects as you can! When uploading your project, fill the description out fully as usual and also leave "case 962315" somewhere in the description so that we may associate the issues easier.

    Thank you for your patience and cooperation!

  8. Eab74bae2227244e0a34aa7c13d6b662?d=mm

    pavlik1307

    Aug 24, 2018 09:44

    I have updated Unity to 2018.2.5f1 and still have the issue. I'm animating my game object which has mesh and collider by scaling it down. Collider updates when I reenable Box Collider itself or reenable it's IsTrigger property. I noticed that collider updates correctly when I put my game object into another empty game object and when I animate this empty game object's scale instead of my game object's scale.

  9. 4f443ab9ddb4160922b40fecc0055149?d=mm

    pastaluego

    Aug 22, 2018 14:51

    After some testing I've discovered that 2018.2.4f1 doesn't seem to sync transforms automatically in editor anymore if transforms are moved without a rigidbody.
    Despite Physics2D.autosyncTransforms being enabled, if I move a transform with a collider2D in update without a rigidbody, unity editor doesn't sync the transforms on move. (Which may end up being a good thing performancewise).

    But if I manually call Physics2D.SyncTransforms after every move, the unity editor properly updates the collider with the movement. This may be an intended change since transforms with rigidbodies don't actually 'move' anyway until the physics step, but in my case I need immediate transform movement.

  10. 4f443ab9ddb4160922b40fecc0055149?d=mm

    pastaluego

    Aug 22, 2018 14:33

    I'm having this issue after updating from 2017.x to 2018.2.4f1. It only happens for my objects interpolating with this method: http://www.kinematicsoup.com/news/2016/8/9/rrypp5tkubynjwxhxjzd42s3o034o8

    I've been doing it this way since ~5.6 and have never had issues before. It only happens in editor playmode where collider isn't matching the transform movement immediately. If I move the transform, then refresh the editor in some other way (like clicking on inspector or clicking a tool in editor), the collider will then update to the new position. But it's not automatically updating anymore.

Add comment

Log in to post comment

All about bugs

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