Search Issue Tracker
By Design
Votes
0
Found in
2017.4.0f1
2018.3.0a1
2018.3.7f1
2019.1.0a1
2019.2.0a1
Issue ID
1135083
Regression
No
CharacterController overrides object's position when teleporting with Transform.Position
How to reproduce:
1. Open attached project ("CharacterControllerTransform.zip")
2. Open SampleScene
3. Play
4. Use WASD to move and Space to transform to (0,0,0)
Expected result: Character transforms to (0,0,0).
Actual result: Character sometimes stays in the position it was.
Reproducible with - 2017.4.24f1, 2018.3.10f1, 2019.1.0b8, 2019.2.0a9
Note: only reproducible in the Editor.
-
hbashiri
Dec 24, 2023 06:35
The same issue in 2021.3.13 in both the editor and the build version. It's not even consistent, sometimes it happens and sometimes it doesn't. I guess it depends on the frame rate and when my start calls
-
JampotDev
Oct 02, 2022 13:26
I'm having the same issue in version 2021.2.16f1, a version that isn't on the list. I fixed it by syncing manually by calling Physics.SyncTransforms.
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
- [Mobile] Developer Console does not appear when an error is thrown
- [HDRP] Game view renders artifacts when Camera's Component "Post Anti-aliasing" is set to "TAA" and Dynamic Resolution's "Forced Screen Percentage" is changed
- A deactivated Prefab's name color becomes white when a GameObject in the scene is deactivated
- The Game view becomes blank when using Frame Debugger with MSAA and Texture binding enabled in Play Mode
- NullReferenceException is thrown when changing the Inspector preview selection
Resolution Note:
The problem here is that auto sync transforms is disabled in the physics settings, so characterController.Move() won't necessarily be aware of the new pose as set by the transform unless a FixedUpdate or Physics.Simulate() called happened in-between transform.position and CC.Move().
To fix that, either enable auto sync transforms in the physics settings, or sync manually via Physics.SyncTransforms right before calling Move().