Simple mouse question

Mar 15, 2013 at 11:06 PM
Hello,

I've simple question about mouse/camera position, When I have Free camera turned on, camera will rotate fine WITHOUT Mouse button held. But if I turn on character camera, I must hold mouse button.
I want tu remove this condition from character camera, but I don't now where. I'm looking in messages, components etc.
My problem is that I want to show and hide mouse cursor during playing game (sometime I need show cursor for 2D graphics in game). If I move with cursor during cursor is showing and then I hide cursor, camera is rotated and this I DO NOT.

Can someone help me?

Thanks a lot.
Joseph
Coordinator
Mar 15, 2013 at 11:50 PM
The camera used by the character uses the ArcBallCameraInputComponent, which is in the Components/InputComponents folder. The line you're looking for is line 320, where it says "if (this.inputs.IsHeld(MouseButton.Left))". Try just commenting that line out.


On Mar 15, 2013, at 5:06 PM, "joujo1212" <notifications@codeplex.com> wrote:

From: joujo1212

Hello,

I've simple question about mouse/camera position, When I have Free camera turned on, camera will rotate fine WITHOUT Mouse button held. But if I turn on character camera, I must hold mouse button.
I want tu remove this condition from character camera, but I don't now where. I'm looking in messages, components etc.
My problem is that I want to show and hide mouse cursor during playing game (sometime I need show cursor for 2D graphics in game). If I move with cursor during cursor is showing and then I hide cursor, camera is rotated and this I DO NOT.

Can someone help me?

Thanks a lot.
Joseph
Mar 16, 2013 at 1:01 AM
Thank you, it works! :)
But my second problem was recording mouse move when mouse cursor is showing. Then when I hide cursor camera make quick move. Can I somehow fix it?
Coordinator
Mar 16, 2013 at 5:25 AM
If you've begun altering code it's tough to say what could be causing your issue. The mouse cursor can only be hidden if "IsMouseVisible" on the QSGame class is set to false. So you could search the project for places where IsMouseVisible could be set to false, and place breakpoints there to see when it's being hit.

The only places I know of that the engine changes mouse visibility are both in QSGame.cs, within the SetMouseVisibility and ToggleMouseVisibility functions.

Also, if you're using the free roaming camera, look at in FreeCameraInputComponent at line 112, that is where the camera only updates if the cursor is not visible.

On Fri, Mar 15, 2013 at 7:01 PM, joujo1212 <notifications@codeplex.com> wrote:

From: joujo1212

Thank you, it works! :)
But my second problem was recording mouse move when mouse cursor is showing. Then when I hide cursor camera make quick move. Can I somehow fix it?

Read the full discussion online.

To add a post to this discussion, reply to this email (QuickStartEngine@discussions.codeplex.com)

To start a new discussion for this project, email QuickStartEngine@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Mar 17, 2013 at 1:36 AM
Thanks, partially you solved my problem. Anyway, now works my camera very well. :)