Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Question Animation Rigging foot placement issue (leg sliding)

Discussion in 'Animation Rigging' started by obi38, Nov 13, 2020.

  1. obi38

    obi38

    Joined:
    Nov 13, 2018
    Posts:
    5
    Hello everyone,

    I have issues with the animation rigging package and the Two Bone IK Constraint.
    I want implementing foot placement for an 3D spider model. So I do a raycast from the leg in order to get the point where the leg should be and the I move the IK target position.y to the hit point.y.
    The problem is that the leg keep sliding indefinitely and I don't know why.
    I tried to move the code in Update function, LateUpdate and FixedUpdate but nothing is changing.
    You can see the problem here : https://drive.google.com/file/d/18HEJqnGG03PrjTNcpErhHwSrREocoG-S/view

    How can I resolve it.
    Thanks you for your help.
     
  2. danUnity

    danUnity

    Joined:
    Apr 28, 2015
    Posts:
    229
    Hey Obi,

    Is it possible your raycast origin is on the leg so as you move it towards your target, your raycast target moves too and cause this infinite leg movement effect?
     
  3. obi38

    obi38

    Joined:
    Nov 13, 2018
    Posts:
    5
    Hi,
    I don't think the problem come from that, because I only move the target on the Y axis, and in many tutorial people are doing the same thing.
     
  4. danUnity

    danUnity

    Joined:
    Apr 28, 2015
    Posts:
    229
    Hum.. hard to say with just a video like that then