View Issue Details

IDProjectCategoryLast Update
0029891Heart Of The MachineBug - OtherNov 27, 2024 3:36 pm
Reportermblazewicz Assigned ToChris_McElligottPark  
Status assignedResolutionopen 
Product Version0.596 Escaping The City 
Summary0029891: Other - Buildings in the path of the dragon that will be destroyed aren't highlighted
DescriptionDescription:
Buildings in the path of the dragon that will be destroyed aren't highlighted leading to sometimes destroying own buildings by accident

Steps to reproduce:
1. Load the provided save
2. Select the dragon and toggle it's move function
3. Move the dragon in a way where between your starting locating and desired point at least one tall building is located
4. Observe that the building is destroyed despite not being highlighted
TagsNo tags attached.

Relationships

related to 0029911 new Suggestion - Highlight buildings that will be destroyed if you reposition the Great Wyrm to highlighted spot 

Activities

Chris_McElligottPark

Nov 26, 2024 2:25 pm

administrator   ~0070897

Yep, this is on purpose. I don't actually even know, and it would be very hard to calculate in advance, due to the nature of the colliders. There is not a true technical solution to this that would not over-estimate or under-estimate.

In general, this will cause players to have to just be extra careful about how they fly their dragons, which I like. If they move the ghost of the dragon across the route, they can test any particular spot, if they care to that degree.

mblazewicz

Nov 26, 2024 2:28 pm

manager   ~0070898

Adding attachments:
29891_Video.mp4 (5,845,905 bytes)   
29891_Save.save (4,240,227 bytes)

mblazewicz

Nov 26, 2024 3:21 pm

manager   ~0070899

Re-opening based on: https://discord.com/channels/@me/1242835929375182951/1311061834505130106

This solution is based on the assumption that buildings are destroyed basically OnCollisionEnter with dragon's collider or similar:
You can copy the dragons collider and move it from dragon to mouse position once per... whatever seems best but every 10-20 frames or change to mouse position would be my go to solutions.
If the partial colliders are direct children of the dragon (for whatever reason), make all partial colliders into children of an empty game object that will group them and when you reference and copy the parent you just set up this should also copy the children.
That will give you the exact data of which buildings will be destroyed exactly while also at least seemingly not being hard to implement, there are some more optimal but also tricky solutions. E.g. you could copy just the widest collider and cast it at desired height. That will give you the same data, while only moving one collider instead of the collective, but requires colliders to be setup in a specific way
(If you go with either of these remember to destroy them probably best idea would be to destroy them based on distance from the dragon since the distance shouldn't be grater than the movement range)

mblazewicz

Nov 26, 2024 3:50 pm

manager   ~0070900

Last edited: Nov 26, 2024 3:51 pm

Since the custom colliders are capsulecast-y (Rather than Unity default I was used to and assumed at the begining)

Find the point exactly half way between dragon and cursor at desired height (Math for that was pretty simple but for the life of me I can't remember it)
Specifically copy the widest "collider"
Place the copy at the aforementioned point (preferably while placing)
Rotate it to be on the line from cursor to dragon (preferably while placing)
Stretch it to be the full depth of the line (scale = 1/2 line length probably should do the trick but no guarantees) (preferably while placing)
Depending on what you can do with it either destroy (and place a new one on the next check) or make the end closest to the mouse follow the mouse cursor

This should give you the exact data needed

Issue History

Date Modified Username Field Change
Nov 26, 2024 2:18 pm mblazewicz New Issue
Nov 26, 2024 2:18 pm mblazewicz Status new => assigned
Nov 26, 2024 2:18 pm mblazewicz Assigned To => mblazewicz
Nov 26, 2024 2:25 pm Chris_McElligottPark Status assigned => closed
Nov 26, 2024 2:25 pm Chris_McElligottPark Resolution open => no change required
Nov 26, 2024 2:25 pm Chris_McElligottPark Note Added: 0070897
Nov 26, 2024 2:28 pm mblazewicz Note Added: 0070898
Nov 26, 2024 2:28 pm mblazewicz File Added: 29891_Video.mp4
Nov 26, 2024 2:28 pm mblazewicz File Added: 29891_Save.save
Nov 26, 2024 2:28 pm mblazewicz Assigned To mblazewicz => Jan Kuzior
Nov 26, 2024 2:29 pm Jan Kuzior Assigned To Jan Kuzior => Chris_McElligottPark
Nov 26, 2024 3:21 pm mblazewicz Status closed => assigned
Nov 26, 2024 3:21 pm mblazewicz Note Added: 0070899
Nov 26, 2024 3:22 pm mblazewicz Resolution no change required => open
Nov 26, 2024 3:50 pm mblazewicz Note Added: 0070900
Nov 26, 2024 3:51 pm mblazewicz Note Edited: 0070900
Nov 27, 2024 3:36 pm mblazewicz Relationship added related to 0029911