mousePos problem

Post your help queries and engine programming questions here

mousePos problem

Postby Riowind » Sat Nov 28, 2015 2:58 am

I am running into a problem in my multiplayer game where the mouse position doesn't update if the camera scrolls and the mouse stands still.

*I want the ship to keep following the cursor even though it's sitting still, not stop at where It was when I began

In short, the way I'm doing it now is every tick the client sends its ige.mousePos() to the server and stores it to the server's player list as players[client_id].mousePos = data. From there if ige.isServer() then move to self.mousePos.

How do I fix this and how should I be doing it differently?

Thank you
Posts: 8
Joined: Thu Oct 29, 2015 7:55 pm

Re: mousePos problem

Postby rob » Thu Apr 21, 2016 7:26 am

Hmm that is weird, mousePos() should update based on camera position... what entity are you asking for mousePos() from? Keep in mind that mousePos() will be different for different entities. I think that the main root entity should be the one you ask it from but not sure what you've coded, could I see the code?
CEO & Lead Developer
Irrelon Software Limited
User avatar
Site Admin
Posts: 316
Joined: Tue Oct 22, 2013 5:08 pm

Return to Help & Questions

Who is online

Users browsing this forum: No registered users and 1 guest