ditzel / SimpleIK

Unity Inverse Kinematics made easy
MIT License
391 stars 78 forks source link

The wireframe gizmos now update in edit mode, to give you a preview #8

Closed ashelleyPurdue closed 3 years ago

ashelleyPurdue commented 3 years ago

This way, you don't need to keep switching to play-mode when creating an animation that moves an IK target.

To achieve this, I made the script execute in edit mode, except for the part that applies the transformations to the GameObjects. I then rewrote OnDrawGizmos() so that it looks at the Positions[] array, instead of the GameObject transforms.

I also made some other changes to make it behave nicer in edit mode:

ashelleyPurdue commented 3 years ago

Turns out there are some mistakes that I didn't catch before submitting the pull request. I'll reopen it once I'm more confident that I didn't introduce any errors.