Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  6. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  7. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  8. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Need a little bit of help with an IK script I wrote

Discussion in 'Animation' started by Elliot_Padfield, Mar 13, 2018.

  1. Elliot_Padfield

    Elliot_Padfield

    Joined:
    Aug 6, 2017
    Posts:
    4
    I am an Animator/ Rigger in Autodesk maya and I have been playing around with IK in Unity, first of all it is great fun and everything I have done so far I am really proud of considering I have only started writing C# the last 2 months alongside my animation.

    There is a few little problems which I'm hoping you guys will be able to help me out with?

    I have attached the code file in the post,

    please check out this vid too - https://gyazo.com/68948af9c31357d12300d36140725ef6

    Basically the Ik on the hands and legs only work if I enable the look at first.. It looks like the IK wants to work when I turn on the Boolean in the inspector as it is changing the little red points on the screen, but it just wont change the actual position of the Ik.

    Any help will be super helpful,

    I am not a C# programmer (Yet) Still learning, so I know there will loads of mistakes in this script.. Be gentle with me :eek:
     

    Attached Files:

  2. DominoM

    DominoM

    Joined:
    Nov 24, 2016
    Posts:
    431
    The else statement will always execute if lookAt is false. You should split up the else into sections for each of the ik features you can enable.
     
  3. Elliot_Padfield

    Elliot_Padfield

    Joined:
    Aug 6, 2017
    Posts:
    4
    Ok thank you for you help, I will give that a go now :)
     
  4. Elliot_Padfield

    Elliot_Padfield

    Joined:
    Aug 6, 2017
    Posts:
    4
    DominoM likes this.