OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

How to set mouse position


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
michael kapelko
Guest





PostPosted: Thu Dec 20, 2012 10:08 am    Post subject:
How to set mouse position
Reply with quote

Hi.

Can anyone tell me how to set mouse position in OSG?
I tried to google it up without any success.
Thanks.

------------------
Post generated by Mail2Forum
Back to top
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12024

PostPosted: Thu Dec 20, 2012 10:17 am    Post subject:
How to set mouse position
Reply with quote

HI Michael,

On 20 December 2012 10:10, michael kapelko < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Can anyone tell me how to set mouse position in OSG?I tried to google it up without any success.

viewer.requestWarpPointer(x,y);

Robert.

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 461
Location: France

PostPosted: Mon Apr 23, 2018 7:12 pm    Post subject:
Re: How to set mouse position
Reply with quote

Hi
I'm beginning the implementation of my own StandardManipulator
and would like to make a classic fps controller.
So mouse must stay centered all delta mouse pos be captured
However I found out that requestWarpPointer posts a wrapMouse event both in Viewer and GraphicWindows implementations.
it leads to duplication of the event (which is not so bad) but more dramatic, it prevent to recenter mouse without trigger an osgevent.
Is it a desired behavior?

robertosfield wrote:
HI Michael,

On 20 December 2012 10:10, michael kapelko < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Can anyone tell me how to set mouse position in OSG?I tried to google it up without any success.

viewer.requestWarpPointer(x,y);

Robert.

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message Visit poster's website
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12024

PostPosted: Tue Apr 24, 2018 8:06 am    Post subject:
How to set mouse position
Reply with quote

Hi Julian,

On 23 April 2018 at 20:13, Julien Valentin <> wrote:
Quote:
I'm beginning the implementation of my own StandardManipulator
and would like to make a classic fps controller.
So mouse must stay centered all delta mouse pos be captured
However I found out that requestWarpPointer posts a wrapMouse event both in Viewer and GraphicWindows implementations.
it leads to duplication of the event (which is not so bad) but more dramatic, it prevent to recenter mouse without trigger an osgevent.
Is it a desired behavior?

Yes. If the mouse moves you want objects that depend upon mouse
position to wake up to the fact that it's moved using an event.

I can't work out what the problem you are having.

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts How to create a 3D ray from cursor po... Waaayoff General 2 Mon Jul 16, 2018 3:34 pm View latest post
No new posts [customizing manipulator] problem wit... mp3butcher General 1 Tue Apr 24, 2018 3:19 pm View latest post
No new posts OSG & QtQuick(QML) & setMirro... karcios General 0 Wed Apr 11, 2018 12:45 pm View latest post
No new posts Overriding the mouse pan up/down adrianj General 3 Tue Feb 27, 2018 10:28 pm View latest post
No new posts Mouse position to object space GeekOwl General 4 Thu Nov 23, 2017 11:45 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP