It does occur when using CharacterController.Move() as well.
It does not occur when I remove the CharacterController and add a CapsuleCollider instead and write to transform.position.
I should also mention that I turned off the auto-sync features.
Yep thought that would be the case. They should make sure that they update the physics viz if they aren’t already, and draw colliders for things where they logically are rather than where the mesh appears to be.
I’m sure they thought of that. Right? I hope. In any case someone should think about updating the physics vis or a lot more reports like this will be soaking up QA time.
I have a hard time wrapping my head around this, because If I understand MelvMay’s reply regarding autoSyncTransforms correctly, Unity does do a sync always, no matter whether autoSyncTransforms is set to true or false. The only difference seems to be when this happens.
My thought is or was, because Unity does seem to sync transforms even with autoSyncTransforms set to false, the CharacterCollider changes on the transform should find their way over to the physics engine. But they don’t seem to, which is why I submitted the bug-report.
Well that’s 2D and this is Physx, so maybe it doesn’t happen with Physx? @yant@MelvMay
Would be nice to have some tips or ref I can advise or help forum users with
Here’s my guess: the SyncTransforms that is always called once per fixed update even when autoSyncTransforms = false is actually called by the Physics.Simulate that is internally called when autoSimulation is true
Edit: I’d be curious to see what happens if you set both autoSyncTransforms and autoSimulation to false but call Physics.SyncTransforms manually once per frame in your example project
Hey. I commented the fogbugz case, but putting something similar here, for better transparency.
So the CharacterController is actually two things in one internally, in PhysX. It’s both a shape (ie Collider in Unity-speak) and a kinematic actor (ie Rigidbody with “isKinematic” set). Calling CharacterController::Move results in something similar to Rigidbody::MovePosition really, and the result of that is only available after a simulation was run. In this project, the simulation is never run (Physics.autoSimulation=false), and nothing is calling Physics.Simulate() either. That’s why the CC’s shape doesn’t happen to be where you expect.
I wonder why does it work if I remove the CC and add a Capsule Collider then? In this case, it’s still Physics.autoSimulation=false and Physics.Simulate() isn’t called either, but the Capsule Collider position if where you’d expect it.