Skip to content

Decouple the calculations of TurretOffset and HeightShadowScaling#2137

Merged
Coronia merged 5 commits intoPhobos-developers:developfrom
DeathFishAtEase:turretshadowoffsetfix
Mar 17, 2026
Merged

Decouple the calculations of TurretOffset and HeightShadowScaling#2137
Coronia merged 5 commits intoPhobos-developers:developfrom
DeathFishAtEase:turretshadowoffsetfix

Conversation

@DeathFishAtEase
Copy link
Collaborator

When drawing the shadow of an airborne unit, TurretOffset is applied to a transformation matrix that has already been scaled for height, causing the turret shadow's offset to be scaled as well and resulting in a misalignment with the actual turret image position.

Note

Example reproduction steps:

  1. Duplicate a [DISK] unit
    • It flies in the air while its shadow is on the ground, making it easy to observe.
  2. Set ShadowIndex=-1 on both to hide the body shadow
    • Leaving only the turret shadow visible for clarity.
  3. Apply a TurretOffset to one of them to displace the turret by a certain distance
    • Preferably a multiple of cell distance, e.g., 512 leptons as in the image below.
  4. Place both units at the same altitude and separate them horizontally by the same amount as the TurretOffset value. Check if the two turret shadows overlap.

Before:
Shadow

After:
Fixed

@DeathFishAtEase DeathFishAtEase added ❓Phobos bug Something isn't working properly Needs testing ⚙️T1 T1 maintainer review is sufficient Bugfix This is a bugfix that does not need documentation beyond mention in changelog labels Mar 16, 2026
@github-actions
Copy link

github-actions bot commented Mar 16, 2026

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

@phoboscn-bot
Copy link

To Chinese users:
This pull request has been mentioned on Phobos CN. There might be relevant details there:

致中文用户:
此拉取请求已在 Phobos CN 上被提及。那里可能有相关详细信息:

https://www.phoboscn.top/t/topic/244/1

@Coronia Coronia merged commit edd7bff into Phobos-developers:develop Mar 17, 2026
10 of 12 checks passed
@DeathFishAtEase DeathFishAtEase deleted the turretshadowoffsetfix branch March 17, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix This is a bugfix that does not need documentation beyond mention in changelog ❓Phobos bug Something isn't working properly ⚙️T1 T1 maintainer review is sufficient Tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants