Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

106
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda