Search Unity

friction between colliders! when using transforms not forces

Discussion in 'Scripting' started by Schaerer, Sep 26, 2008.

  1. Schaerer

    Schaerer

    Joined:
    Dec 17, 2007
    Posts:
    35
    hi
    I am building a walking machine that uses transforms to rotate the leg segments instead of using physX joints and I have now encountered slip between the floor and the walkers feet.
    I assume that when I manually move the legs this bypasses the physics calculations and acts like an animation thus causing the perceived slip!

    Does anybody have any ideas on this?
    I tried to use configurable joints initially but there was way too much jitter.

    Thanks,
     
  2. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    It shouldn't matter.
    When you rotate a joint and you have your colliders setup right, it wouldn't matter the angle of the foot to the ground, the collider between the foot and the ground should work fine without it thinking it is just an animation.

    You are not dealing with a capsule which is like the FPS character colliding model with animation applied to a character, you are dealing with your character on a different level where you tell each joint to move and how to move in the game.

    PhysX can work just fine with this, make sure your ground traingles are not to large or you might have collision detection issues on a small scale, but other than that, it should work.
     
  3. Schaerer

    Schaerer

    Joined:
    Dec 17, 2007
    Posts:
    35
    Thanks,

    I will try and make the floor have many triangles. btw I do not have joints attached to the body.
     
  4. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    You might want to give it a basic skeleton and name the segments then rotate the bones instead. Either way, using a mesh collider on the walker and using transform on named segments should still work.

    Each body part would require its own mesh collider, each part needs to be parented in some way (which you probably obviously already have setup)

    (well honestly the only 2 parts that "need" colliders is the feet, but if it falls, you need colliders so that it doesn't fall through the floor or terran and hang upside down)