Engine icon indicating copy to clipboard operation
Engine copied to clipboard

Bug: env_sun does not render properly with pitch -90

Open Pacca64 opened this issue 1 year ago • 0 comments

Describe the bug

When an env_sun has its' use_angles keyvalue set to 1 and its' pitch is -90 (or an equivalent, like 270), it becomes invisible. The entity still exists, but cannot be seen. This makes it impossible to display the entity directly overhead. Placing it ever so slightly off (like at -89.99) seems to work fine though. Tested in Portal 2 Community Edition. Apparently, the same bug has existed in other source games (at least in TF2, according to this tf2maps.net post) for a while as well.

To Reproduce

  1. create a map in hammer with visible skybox above the player
  2. place an env_sun
  3. open the properties of the env_sun, and set its' use_angles keyvalue set to 1, it's angles set to -90 0 0, and it's pitch keyvalue to -90
  4. compile the map, then look up

alternatively, this console command can be used to test the bug on any map with visible overhead skybox: ent_create env_sun use_angles 1 pitch -90 angles "-90 0 0"

Issue Map

sun_overhead_bug.zip map was created with P2CEs' tools, and use the Half Life 2 skybox sky_borealis01 by default (as portal 2s' content lacks normal skyboxes).

Expected Behavior

An env_sun set to appear directly overhead should be visible and function normally.

Operating System

windows 10

Pacca64 avatar Jan 10 '25 22:01 Pacca64