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.
  2. Dismiss Notice

Resolved How to hold an object to a Chain IK constraint?

Discussion in 'VR' started by Roulace, Aug 19, 2021.

  1. Roulace

    Roulace

    Joined:
    Feb 5, 2017
    Posts:
    27
    I have this lamp in my game hooked together with a bunch of hinges. The bendy tubes in the back are connected via ChainIK constraints and bones. It all works fine, except I can move the light out of range of the chain. Any ideas on how I could fix this? I tried keeping the objects within radius of each other but it glitches out pretty wildly.

    I included a GIF showing my problem:
     
  2. Roulace

    Roulace

    Joined:
    Feb 5, 2017
    Posts:
    27
  3. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,796
    Hello there! Were you able to find a solution?
     
  4. Roulace

    Roulace

    Joined:
    Feb 5, 2017
    Posts:
    27
    Yes, sorry. Turns out "LateUpdate()" is a thing. That's where put a function to restrict the light's position to the ChainIK object.