ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Help with CopperCube
forum topic indicator unlock mouse cursor in first person
person icon
presidentg
Registered User
Quote
2023-08-21 04:02:12

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?

person icon
Dieter
Guest
Quote
2023-08-21 09:10:48

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.


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |