Search Unity

Stop OVRplayerController movement but allow rotation.

Discussion in 'Scripting' started by Showoffz, Apr 28, 2016.

  1. Showoffz

    Showoffz

    Joined:
    Feb 12, 2016
    Posts:
    8
    Hello

    I am using a code that moves the OVRPLayerController.

    1. player.GetComponent<CharacterController>().Move(direction *Time.deltaTime);
    But During that I want to block OVRPlayerController from moving AND still allow rotation. Right now I have used :

    1. playerController.enabled =false;
    2. gamepadController.enabled =false;
    But that locks also the rotation. Is there a good way of doing this? Or I will need to modify default controller files?
     
  2. Showoffz

    Showoffz

    Joined:
    Feb 12, 2016
    Posts:
    8