arcade bodies do not scale with camera

Aperta
#315 12 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
backend, game-dev

Direzione di ricerca

The issue identifies this.game.camera.scale.setTo(2) and links a potential fix in commit f732cc1129c28f1cd821e28259f942f34a11c1a6. Start by reviewing that commit and the camera scaling and Arcade Physics code it touches. Done means Arcade bodies scale with the camera so collision behavior matches scaled sprites; the issue also asks for documentation to hint at the limitation.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

This Issue is about

  • A bug in the API:
    • Phaser version(s): 2.6.1 and earlier up to 2.8.1 and potentially higher
    • What should happen: As sprites do scale with camera, arcade bodies should scale accordingly
    • What happens instead: Sprites scale with camera, however arcade bodies stay unaffected by camera scale, leading to incorrect collisions. this.game.camera.scale.setTo(2)
  • An error in the documentation: The documentation should at least hint at this problem

See also a potential fix.
https://github.com/RolandMQuiros/phaser/commit/f732cc1129c28f1cd821e28259f942f34a11c1a6

Lingua principale
JavaScript
Stelle
1.4k
Fork
485
Merge medio
1g 2h
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di phaserjs/phaser-ce

Tutte le issue di phaserjs/phaser-ce

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.