Search Issue Tracker
Fixed in 2019.2.X
Votes
1
Found in
2017.3.0a1
2018.3.0a1
2018.3.3f1
2019.1.0a1
2019.2.0a1
Issue ID
1123107
Regression
No
Sampling the position of the GameObject with Update function does not yield the correct position
Steps to reproduce:
1. Open attached project "ConstraintBugReport.zip"
2. Open the "ConstraintBug" scene
3. Press Play
Expected results: Sphere follows "ConstraintBugTimeline" GameObject.
Actual results: Sphere visibly lags behind "ConstraintBugTimeline" GameObject.
Reproduced in: 2017.4.20f1, 2018.3.5f1, 2019.1.0b2, 2019.2.0a4
Comments (2)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
julian_cruz
Mar 06, 2020 15:11
Hi @silverbackalex, you cannot Update an FBX animation + Timeline in a character that has attached a *ParentConstraint*. Since the ParentConstraint is performed before LateUpdate in an internal function called PreLateUpdate.
Thus, if you Update the Timeline in the LateUpdate the position of the Character will be already constraint at that moment. Practically, It's too late for animating the position.
The best approach will be using Update instead, and if you require to do that later of all Update callbacks, you may use the Script Execution Order Settings to add the script after the default time.
https://docs.unity3d.com/Manual/class-MonoManager.html
I hope you may find this information useful.
silverbackAlex
Feb 27, 2019 20:21
I don't know if it matters, but this title is a bit misleading. This issue pertains specifically to constrained GameObjects , and LateUpdate; not regular GameObjects and Update.
The inability to sample animated GameObjects in Update is normal; you can sample them in LateUpdate.
This issue concerns objects bound by the AnimationModule's Constraints - such as ParentConstraint and PositionConstraint. Objects so constraint can't be sampled correctly even in LateUpdate.