Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Im using this behavior called SM Third Person controller and it requires that I use first person controller attached to the camera in order for it to work, but Im keeping the camera in one spot for the whole time and I want the mouse cursor to be usable. I was able to unhide the mouse but it is locked the middle of the screen and I am not sure how to unlock it from the fps behavior. Any ideas? |
||||
|
Well, why do you need a third person camera controller if the camera is fixed? If the target is webGL, you may use: document.exitPointerLock(); but in windows etc targets the "document" object is not working. You can try: ccbSwitchToFullscreen(false,0,false); Or simply have a non-controlled additional camera that is normally hidden and not active. Whenever you need the mouse to be free, you position and rotate this camera, using the properties of the fps camera, then unhide it and make it the active camera, while hiding the now passive fps camera. And do this in reverse when/if the player wants to play on in fps mode. Now maybe I got this wrong and what you want is a Third person camera that follows your character when you walk using some keys, but the mouse should be free and has nothing to do with walking or looking around. In that case I would suggest to write your own code, as this is really very simple. At least in a scenario like Diabolo or so, where the camera is above the world, not colliding with anything. You could simply parent a plain camera to the character. It's an entirely different thing in a "cam right behind players shoulder" type scenario, such as Hitman or Thomb raider. That's more tricky: prevent objects between camera and character, and prevent camera from getting stuck in geometry. |
|