Challenge Collosion Detection

Discussion in 'Empyrion API' started by jharyl, Nov 17, 2021.

Tags:
  1. jharyl

    jharyl Ensign

    Joined:
    Mar 24, 2017
    Messages:
    8
    Likes Received:
    5
    Hi,

    i am by no way a coder but sometimes i have some ideas that may work... In this case, we have a few very talented coders here and maybe this is an inspiration for someone:

    - Is there any way (api) to check if an entity (hv, sv, cv) has an collosionevent (I mean, broken legs, stopping of vehicles, there must be something)? Best of would be with the blocks coordinations that collide.

    - Now lets check speed... Is speed higher then X:

    - Is it possible to spawn an explosion (explosiv block) at impact point? (higher speed, bigger explosion?)

    Due to the different hullpoints the explosion has different outcomes....

    For sure, its very rudimenary but it would be a beginning.
     
    #1
  2. Kassonnade

    Kassonnade Rear Admiral

    Joined:
    May 13, 2017
    Messages:
    2,816
    Likes Received:
    4,111
    Just on this point : since a collision impacts the hull, which is made of steel plates of some sort (blocks = steel plates) why would steel plates "explode" ?

    If any device is at the impact point and there is sufficient damage to it then it may explode, as practically all devices "explode" when destroyed. Why duplicate this feature which is already covered by the normal mechanics with a mod with its performances downsides ?
     
    #2
  3. jharyl

    jharyl Ensign

    Joined:
    Mar 24, 2017
    Messages:
    8
    Likes Received:
    5
    Because this "simulates" that moving mass crashing into another releases energy... (and damages blocks).

    It should be clear that this is by no way correct and just indicates that you have crashed into another object ("simulated" in the easiest way possible).
     
    #3
  4. Kassonnade

    Kassonnade Rear Admiral

    Joined:
    May 13, 2017
    Messages:
    2,816
    Likes Received:
    4,111
    I understand it's to simulate a collision, but why would steel plates explode and not simply be foiled ?
     
    #4
  5. Kassonnade

    Kassonnade Rear Admiral

    Joined:
    May 13, 2017
    Messages:
    2,816
    Likes Received:
    4,111
    Update: I modded the steel blocks to explode with a nice ball of fire when destroyed, but I failed to enforce collision between ships/BA/ terrain to be able to destroy the blocks this way.We can destroy blocks with guns but that's not what we're looking for. Still a cool find...

    In fact blocks take zero damage on collisions, I guess this has something to do with the new ability to knock down trees that players asked for recently. I checked in PvP and in non-PvP playfields, just to be sure this wasn't preventing damage upon collisions.

    But even if some collisions were to do damage, there is one big problem : when ramming a structure with a CV at high speed, 50% of the "hits" result in an encroachment, where the CV blocks get inside the other structure's walls, and it's stuck there like an arrow in a soft target. I had to wiggle the ship around to get it out.

    This means that the "destructible blocks" would end up inside the other object's outer shell, and most probably explode in there instead of upon contact with the outer shell. That is, if any collision is detected... And it looks like that is the cause for the CV going inside the other structure's shell : no collision is detected for the first blocks, or it is detected but the results come in after some delay, allowing the CV to move forward past initial contact.

    I think relying on an additional script to apply effects after a collision would cause even more lag/ delays, and end up with worse results.
     
    #5
    jharyl likes this.
  6. jharyl

    jharyl Ensign

    Joined:
    Mar 24, 2017
    Messages:
    8
    Likes Received:
    5
    Hm, at first i thank you very much for trying this out and for the results found. Yes, this could produces lags (i am sure).

    May i ask how did you do your tests?
     
    #6
  7. Kassonnade

    Kassonnade Rear Admiral

    Joined:
    May 13, 2017
    Messages:
    2,816
    Likes Received:
    4,111
    I modded the HullArmoredFullLarge blocks (2 categories) to have the fireball effect in the blocksConfig.ecf. When I saw that they were not taking damage I added a " IsPhysicsCollider: true " parameter to each block but it changed nothing.

    I used a basic CV with a 4 blocks "pole" in front of it, then made a base on the ground with a tall wall that I rammed repeatedly with the CV. After a few hits I checked the state of the 1st block at the tip of the "ramming pole" to see if damaged or not. Nothing.

    Did the same test in space, in a PvP space orbit playfield, and still no damage. When blocks are destroyed by weapons they explode and damage adjacent blocks (blast radius) but that's it.

    I also rammed trees and hit the ground with the "ramming pole" and got no damage.
     
    #7
    jharyl likes this.

Share This Page