Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

104
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda