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

217
Vistas
Phaser3, Creating Rounded Rectangle, Not Staying Put Relative To Window

I'm trying to create a scoreboard using phaser3. It creates the board when I do the following in create function:

    this.gr = this.add.graphics();

    this.gr.fillStyle(0xffffff, 0.3);

    this.gr.fillRoundedRect(32, 32, 100, 300, 32);

    this.gr.fillStyle(0xff00ff, 1);

But it creates it in the top left of the game world and not the screen itself (I'm having to travel to top left of the map to see it rather it being top left relative to window). For context, this is alike agar.io where the player moves around the map with the camera clipped to them.

I tried updating the position using the character sprite's position, but it doesn't flex like it should, and there's probably a more proper way of doing it.

Question: how can I have it be visible relative to the window and not game world?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

YourGraphic.setScrollFactor(0,0);

about 4 years ago · Juan Pablo Isaza Denunciar
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