public override void ComponentOnEnable() { CacheNetTransform.enabled = true; CacheOpenCharacterController.enabled = true; CacheOpenCharacterController.SetPosition(CacheTransform.position, true); tempVerticalVelocity = 0; CacheNetTransform.onTeleport += OnTeleport; }
public override void EntityStart() { yRotation = CacheTransform.eulerAngles.y; tempCurrentPosition = CacheTransform.position; tempCurrentPosition.y += GROUND_BUFFER; CacheOpenCharacterController.SetPosition(tempCurrentPosition, true); tempVerticalVelocity = 0; }
protected void OnTeleport(Vector3 position, Quaternion rotation) { CacheOpenCharacterController.SetPosition(position, true); tempVerticalVelocity = 0; }