FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.73k stars 403 forks source link

[Unstable] Cracked ruin walls are almost invisible #14705

Closed Regalis11 closed 1 week ago

Regalis11 commented 1 week ago

Discussed in https://github.com/FakeFishGames/Barotrauma/discussions/14659

Originally posted by **ubertpendragon** September 19, 2024 ### Disclaimers - [X] I have searched the issue tracker to check if the issue has already been reported. - [ ] My issue happened while using mods. ### What happened? Cracked ruin walls are almost invisible: * "Draw behind walls" lights don't illuminate them * Shadow casting lights (like diving suit light) only shows their edge Examples: ![image](https://github.com/user-attachments/assets/a26cb5dd-0946-43f8-85c7-e73f37609827) ![image](https://github.com/user-attachments/assets/ae406903-df1e-4fdf-b35d-7812f02ef8e2) ![image](https://github.com/user-attachments/assets/887c2a14-a2ce-4e09-ba5d-00d5e905372c) **The width/height of the collider must be thinner than the sprite itself** This wall sprite is larger than its collision box, so you can see deep into the sprite ![image](https://github.com/user-attachments/assets/51ae8ab5-653e-4bcc-a30a-580c9b32dcf0) So for example: Height property should be half the Y of the sprite ```xml ``` ### Reproduction steps Try finding a cracked wall I dare you ### Version v1.6.4.0 (unstable)
JeroonBosch commented 1 week ago

So for example: Height property should be half the Y of the sprite

This wouldn't work, as it cuts off the sprite. What we're looking for instead are the bodyheight/bodywidth properties

ubertpendragon commented 1 week ago

So for example: Height property should be half the Y of the sprite

This wouldn't work, as it cuts off the sprite. What we're looking for instead are the bodyheight/bodywidth properties

My bad I was thinking about bodywidth

200 bodywidth for 254 sprite width

  <RuinWallVerticalHeavyWeakened2 name="ROOCHERWALL" identifier="RuinWallVerticalHeavyWeakened2" descriptionidentifier="resizeablewallwithcollisiondetection" category="Alien" castshadow="true" bodywidth="200" resizevertical="true" body="true" scale="0.5" health="5000" noaitarget="true" damagesound="StructureAlien">
    <sprite texture="Content/Map/AlienWallSet1.png" sourcerect="-2,1025,254,510" depth="0.061" spritecolor="255,0,0,255" />
  </RuinWallVerticalHeavyWeakened2>

image

Although it does have a strange interaction with light if too close but only in the middle section

image

Regalis11 commented 1 week ago

Fixed, closing