Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

101
Views
Canvas position of cursor image in different resolution screens

I am trying to make a multiplayer game in which the user will be playing the game in desktop screen and the same will be displayed in multiple screens. I have give a cursor image to display the position of the cursor in the mobile devices as well.

I am running into the problem of matching the position of cursor, there is an offset that is coming which is not displaying correctly in current screens and other screens. Any help can make my life easy.

Here is the code:

var Mouse_Pos;
Uicontainer.prototype.onMouseMove = function(event) {
  Mouse_Pos.x = event.x;
  Mouse_Pos.y = -event.y;
  Mouse_Pos.z = 0;
  this.Cursor.setLocalPosition(Mouse_Pos.x, Mouse_Pos.y, 0);
  //this i was exchanging with other players to match with their screen resolutions. 
  Cur_Pos_Upd = "cursorPos_" + (Mouse_Pos.x / (window.innerWidth)) + "_" + (Mouse_Pos.y / (window.innerHeight));
};

Thanks in advance.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!