Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Question I don't know why OnCollisionEnter only happens in certain situations

Discussion in 'ML-Agents' started by MAResearcher, Oct 23, 2023.

  1. MAResearcher

    MAResearcher

    Joined:
    Mar 31, 2022
    Posts:
    4
    Hello, I'm using ml agent to study multi agent cooperative combat in marine combat simulator.
    During the research, I had a question about OnCollisionEnter

    It's about shooting down an enemy ship by making a missile object from the ship.
    At this time, the missile works properly using Unity Recorder or during ml agent learning, but frequently passes through the enemy ship when played directly by pressing the Start button on the Unity screen.

    I'm not sure why this is happening. I'd appreciate your help
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    7,263
    Fast moving projectiles? Try continuous collision detection.
     
    MAResearcher and laurentlavigne like this.
  3. MAResearcher

    MAResearcher

    Joined:
    Mar 31, 2022
    Posts:
    4
    I solved it! thank you