Practical sessions
You can try out these ideas to get a better understanding of Inverse Kinematics:
- Create a new text field in the
UserInterface
class to signal whether the Inverse Kinematics algorithm was successful. We previously created the two solving algorithms to returntrue
if the target was reached, orfalse
if reaching the target failed. - Advanced difficulty: The two algorithms CCD and FABRIK can be extended by so-called constraints. This means you limit the amount of rotation for every node to mimic the behavior of a natural joint, such as the knee or the shoulder. Try to add some of those limits to the nodes, such as a minimum and a maximum angle for one or more of the rotational angles, and check how many iterations a constrained algorithm needs until the target reaches the effector, compared to the original algorithm.
- Advanced difficulty: Add the textured crate back to the screen, and implement a simple collision detection between the sides of the crate...