Const
Reference pixels-per-meter ratio for scale calculations.
Korean: 참조 미터-픽셀 변환
This is the REFERENCE ratio used for calculating scale factors. The actual pixels-per-meter varies by device resolution:
arenaWidthPixels / arenaWidthMeters
actualRatio / REFERENCE_PIXELS_PER_METER
Do NOT use this for direct coordinate conversion. Use bounds.width / bounds.worldWidthMeters instead.
bounds.width / bounds.worldWidthMeters
// Calculate actual pixels per meter from arena boundsconst actualPixelsPerMeter = bounds.width / bounds.worldWidthMeters;// Calculate scale relative to referenceconst scale = actualPixelsPerMeter / REFERENCE_PIXELS_PER_METER; Copy
// Calculate actual pixels per meter from arena boundsconst actualPixelsPerMeter = bounds.width / bounds.worldWidthMeters;// Calculate scale relative to referenceconst scale = actualPixelsPerMeter / REFERENCE_PIXELS_PER_METER;
참조픽셀미터비율
Reference pixels-per-meter ratio for scale calculations.
Korean: 참조 미터-픽셀 변환
This is the REFERENCE ratio used for calculating scale factors. The actual pixels-per-meter varies by device resolution:
arenaWidthPixels / arenaWidthMetersactualRatio / REFERENCE_PIXELS_PER_METERDo NOT use this for direct coordinate conversion. Use
bounds.width / bounds.worldWidthMetersinstead.