Project

General

Profile

Bug #9695

Parts only have a single collider that triggers explosions.

Added by shadowmage45 over 8 years ago. Updated over 8 years ago.

Status:
Confirmed
Severity:
Normal
Assignee:
-
Category:
Physics
Target version:
-
Start date:
05/06/2016
% Done:

10%

Version:
Platform:
Linux, OSX, Windows
Expansion:
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

As per the title, only a single collider object in each part will trigger explosions. This is the collider that is seated in the part.collider field; any others will be ignored.

This can be seen by taking a stock cuppola module and two launch clamps. Take the module to the top of the VAB with the clamps attached so that you get a good 30-40m of drop. Launch the craft, and trigger the clamps. The cuppola will fall to the launchpad and properly explode on contact.

Take that same craft but flip the cuppola over so that the top is facing the ground; launch, and trigger the launch clamps. The cuppola will impact the launch pad, but not explode. Same impact velocity as the first test, the only difference is the collider that is part of the collision.

This can likely be seen on any stock parts with multiple colliders; it appears that only the first non-trigger collider from the model hierarchy will be seated into the part.collider field, and only that collider will trigger explosions.

Will upload logs/pics/etc when I get some time when I'm not at work.

screenshot11.png (1.53 MB) screenshot11.png Prior to launch shadowmage45, 05/10/2016 03:34 PM
screenshot12.png (1.86 MB) screenshot12.png Falling shadowmage45, 05/10/2016 03:34 PM
screenshot13.png (1.52 MB) screenshot13.png Collision with no explosion shadowmage45, 05/10/2016 03:34 PM
18296
18297
18298

Related issues

Related to Kerbal Space Program - Bug #9692: Launch Escape System is nearly indestructable.Duplicate05/05/2016

History

#1 Updated by Pluto239 over 8 years ago

This sounds like it may very well be related to Bug #9692 Launch Escape System is nearly indestructable.

Could it also be related to exploding landing gear from Bug #9638?

#2 Updated by tater over 8 years ago

The same issue happens on Mac OS, it's not a windows issue exclusively.

#3 Updated by shadowmage45 over 8 years ago

  • Status changed from New to Confirmed
  • % Done changed from 0 to 10

#4 Updated by shadowmage45 over 8 years ago

18296
18297
18298

Updated to attach screenshots of the problem. Will update further with a debug script I used to track down where the problem originated at as well as logs that contain the relevant information.

Debug from testing:
[LOG 17:40:23.891] On Collision Enter for part: cupola
[LOG 17:40:23.892] part.collider = collider_base (UnityEngine.MeshCollider)
[LOG 17:40:23.892] Collider Hit: Launch Pad (UnityEngine.MeshCollider)
[LOG 17:40:23.893] Contact 0 Colliders: collider_top (UnityEngine.MeshCollider) :: Launch Pad (UnityEngine.MeshCollider)
[LOG 17:40:23.893] Collision speed 16.02857
[LOG 17:40:23.894] part.checkCollision() returns: False

The last line there is the important one; manually passing the collision info to part.checkCollision returns false, and the collision will not be handled. If I manually pass that same collision data to part.handleCollision() it will properly trigger an explosion.

This issue only effects the following stock parts (the only parts I could find with more than 1 collider):

Cuppola; this is the only one with a low enough impact velocity that it actually matters in-play; all others have a high enough impact velocity that they will (almost) always 'punch-through' and have their part.collider trigger explosions
Mk3 cockpit -- the top window area on the cockpit will not trigger explosions
Mk2 Cargo Bays -- doors will not trigger explosions
Mk3 Cargo Bays -- doors will not trigger explosions
Service Modules -- doors will not trigger explosions

Additionally, this bug may not trigger on every attempt; there appears to be some complex interaction regarding the precise physics setup at the time of collision; many times the cuppolas 'base collider' will still impact the pad and trigger the explosion even though it obviously hit the 'top collider' (e.g. higher velocities = punch through, so the part.collider still collides; regardless any collider that is not the part.collider will refuse to trigger explosions).

Can we please return this to a sensible method where any collider will properly trigger explosions? Perhaps allow specific exclusions with a per-game-object tag?

#5 Updated by tater over 8 years ago

Is it possible to update the Platform losing above, as it affects Mac as well and likely Linux.

#6 Updated by shadowmage45 over 8 years ago

tater wrote:

Is it possible to update the Platform losing above, as it affects Mac as well and likely Linux.

Will likely need to wait for the devs (and moderators) to return from their vacation before we'll see much action on this issue. I have tried, but I do not have the ability to update platforms or versions (and I'm not even sure how I was able to update the status; seems there are some inconsistencies in the bug-tracker UI).

#7 Updated by smjjames over 8 years ago

  • Platform Linux, OSX added

shadowmage45 wrote:

tater wrote:

Is it possible to update the Platform losing above, as it affects Mac as well and likely Linux.

Will likely need to wait for the devs (and moderators) to return from their vacation before we'll see much action on this issue. I have tried, but I do not have the ability to update platforms or versions (and I'm not even sure how I was able to update the status; seems there are some inconsistencies in the bug-tracker UI).

Just has to be someone who is anle to edit it, not neccesarily the devs. And of course, someone has to read what was written. I'll add it for you.

#8 Updated by TriggerAu over 8 years ago

  • Status changed from Confirmed to Needs Clarification
  • % Done changed from 10 to 0

#9 Updated by shadowmage45 over 8 years ago

  • Status changed from Needs Clarification to Updated
  • % Done changed from 0 to 10

Nothing has changed regarding this bug; is still present in 1.1.3 with the exact same reproduction steps.

In order to confirm, look at the source code for the Part class. Note that it has a single 'collider' field, and that only the collider referenced via this field will respond to collisions via exploding; any other colliders on the part will not trigger explosions.

This is more of a modding / mod interaction issue as very few stock parts have multiple colliders, but tons of mod-parts do.

#10 Updated by TriggerAu over 8 years ago

Thanks for the details shadowmage45, your help on the cleanup is appreciated

#11 Updated by sal_vager over 8 years ago

  • Status changed from Updated to Confirmed

Confirmed with this test, thanks!

#12 Updated by bewing over 8 years ago

  • Related to Bug #9692: Launch Escape System is nearly indestructable. added

Also available in: Atom PDF