Now it turns out that this method isn’t implemented in CC 3.8.1
I get the error message : Property setPosition() does not exist on type CharacterController
But according to the docs:
To reset the position of a character controller, use the setPosition method of the character controller instead of using setPosition of the node, as follows. (…) When a character controller node is moved via the
setPosition
method, it will automatically set the position of the physics world simultaneously, however, thesetPosition
orsetWorldPosition
method of the node may cause the scene and physics world position out of sync.
let characterController = this.node.getComponent(CharacterController);
characterController.setPosition(new Vec3(-3,5,6));