arcade bodies do not scale with camera

Đang mở
#315 12 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
backend, game-dev

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
JavaScript
Star
1.4k
Fork
485
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của phaserjs/phaser-ce

Tất cả issue của phaserjs/phaser-ce

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.