Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Collision Problem

Discussion in 'Scripting' started by Unity_gamer, Sep 13, 2011.

  1. Unity_gamer


    Aug 19, 2011
    Hi all,

    I am trying to create FPS melee weapon in my project .The weapon that am trying to create is a Driller.Earlier when i started doing i was facing one problem ,the weapon that is attached with the player does not have any collision so during the Weapon fire animation the weapon will pass through the wall.
    I solved that problem by keeping the Weapon as different layer.But now am facing another problem.
    Now On trigger enter is not working with the Weapon.What i need to do is ,during fire button press Animation will play and that time if the weapon is near the Wall i need to show Drill hole on the Wall.
    For doing this i need ON tigger enter working .In this case it is not working and am not able to detect the Collision between two objects.
    What exactly i need to do solve this.How can i detect the trigger?

    Thanks for any help,
  2. foobar


    Jan 28, 2010
    Is there a rigidbody component attached to either the wall or the weapon? If there isn't at least one rigidbody among the two objects, no collision will be registered.