Search Unity

Can't place an animated collider in front of player character

Discussion in 'Physics' started by zivlaks, Mar 6, 2019.

  1. zivlaks

    zivlaks

    Joined:
    Oct 19, 2018
    Posts:
    2


    Hello. As you can see marked in the picture above, I'm trying to place a collider (marked 1). After that my plan was to use the record button (on 2). I wanted it to change slightly so it follows the movements of the axe you can see on 3. The issue is, if I use a box or capsule collider something happens with the already present body and feet colliders of the same type, and the record button doesn't record the changes I make in the timeline while its active. If I just do the same on the whole body collider it works perfectly but I want to differentiate between my character being touched by an enemy and him touching the enemy with his axe so they have to be two different colliders.
     
  2. PGJ

    PGJ

    Joined:
    Jan 21, 2014
    Posts:
    899
    Can't you put the pickaxe in a child object with a collider and animate the child? It is possible to animate properties of child objects from the parent, so this ought to fix your problem.
     
  3. zivlaks

    zivlaks

    Joined:
    Oct 19, 2018
    Posts:
    2
    I can't because the animations I am using are in the format of a set of images showing player movement that contain they whole player sprite like this:



    Its from an asset pack and I'm not really well versed enough in animation to know how to split it up and animate it separately.

    EDIT:

    Okay. I didn't know this, but I am able to use the record function on the animatior in my "Player" object to make the collider change even though its in the child object of player. Now everything works great!
     
    Last edited: Mar 7, 2019