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.
Comments (3)
-
SZtamjan
May 27, 2024 21:06
Turns out Rigidbody's interpolation does exactly the same when you're trying to set new transform to the object with such configured Rigidbody. Right after seting the new transform to the object, call Physics.SyncTransforms and it should work perfectly fine.
-
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
- ScrollView clips content when under an ancestor that has a filter set
- "Retrieving array element that was out of bounds" error thrown when attempting to remove a column from a Multi-Column List View
- Multi-Column List View horizontal scroll resets to left most position when scrolling vertically
- Floating License is lost for concurrent jobs
- Warning "Failed to insert item" is logged when Assigning Project to Organization's Project in the Project Settings
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().