Search Unity

How to rig something similar to a violin bow?

Discussion in 'Animation' started by roy-equalreality, Feb 8, 2020.

  1. roy-equalreality

    roy-equalreality

    Joined:
    Dec 22, 2019
    Posts:
    1


    Hi! I'm making a violin simulation game but I'm having a hard time working out how to do the IK / rigging for the bow.

    I made a quick visualization of what I want to happen in Unity. Basically I have the bow which I can move around freely using the mouse. When the bow gets near the strings (the big grey cylinder), the bow snaps to the strings and its pivot is now centered there while still being able to slide around freely. The bow "unsnaps" when is moved far enough from the strings.

    The farthest I've gotten is to parent the bow to an empty gameobject so it rotates along the string, but I don't know how to move the bow around while still respecting the the rotation around that pivot. What would be the best way to approach this?

    Any help/advice is greatly appreciated, thank you!
     
  2. mcmount

    mcmount

    Joined:
    Nov 15, 2015
    Posts:
    83
    you could use LookAt with your pivot. so your pivot looks your mouse and your bow rotation is controlled by the pivot. then you just do localposition y to mimic the playing. Using lookat might require an offset object under it, depending your bow orientation.