Category: Unity

  • Inverse Kinematics for Tentacles

    Inverse Kinematics for Tentacles

    This post continues our journey in the depth of Inverse Kinematics. In this tutorial you will learn how to apply this powerful technique to create realistic tentacles. The other post in this series can be found here: At the end of this post you can find a link to download all the assets and scenes necessary to replicate…

  • Inverse Kinematics for Robotic Arms

    Inverse Kinematics for Robotic Arms

    After a long journey about the Mathematics of Forward Kinematics and the geometrical details of gradient descent, we are ready to finally show a working implementation for the problem of inverse kinematics. This tutorial will show how it can be applied to a robotic arm, like the one in the image below. The other post in this series can…

  • Implementing Forward Kinematics

    Implementing Forward Kinematics

    This tutorial continues our quest to solve the problem of forward kinematics. After exploring a mathematical solution in The Mathematics of Forward Kinematics, we will see how to translate it into C# for Unity. The next tutorial, An Introduction to Gradient Descent, will finally show the theoretical foundations to solve inverse kinematics. The other post in this series can be found…

  • The Mathematics of Forward Kinematics

    The Mathematics of Forward Kinematics

    This tutorial starts our journey into the world of inverse kinematics. There are countless ways to approach this problem, but they all starts with forward kinematics. Inverse kinematics takes a point in space, and tells you how to move your arm to reach it. Forward kinematics solves the opposite, dual problem. Knowing how you are moving your arm, it…

  • Nested Coroutines in Unity

    Nested Coroutines in Unity

    This tutorial shows how to make the most out of coroutines in Unity.

  • Fading Sprites in Unity

    Fading Sprites in Unity

    This tutorial shows how to extend the class SpriteRenderer  to support intuitive, painless fading transitions. Despite referring to sprites, this approach can be used to easily animate any property of a game object in Unity. The link for the script used in this tutorial is at the end of the post.

  • Simplified Collision Geometry

    Simplified Collision Geometry

    This tutorial shows how to automatically generate simplified colliders for 3D models imported into Unity. The tutorial uses Google SketchUp as an example, but its knowledge and code is agnostic to whichever modelling tool you are using.

  • Asynchronous Serial Communication

    Asynchronous Serial Communication

    In a previous post, How To Integrate Arduino With Unity, we have shown how data can be sent and received through the serial port. The main problem encountered was dealing with the latency and the delays that communicating across different devices introduces. The solution proposed in that tutorial used a coroutine; decoupling the device communication from the game logic attenuates the…

  • Arrays & Shaders in Unity 5.4+

    Arrays & Shaders in Unity 5.4+

    This post shows how to use arrays and shaders in Unity 5.4. Back in January I already covered this topic in an article called Arrays & shaders: Heatmaps in Unity. My original approach exposed an undocumented feature that allowed to pass arrays to shaders. Since then, Unity 5.4 has introduced proper support in its API. This tutorial replaces…

  • 3D Printer Shader Effect – Part 2

    3D Printer Shader Effect – Part 2

    This is the second part of the tutorial that will recreate the 3D printer effect seen in games such as Astroneer and Planetary Annihilation. This is a two part tutorials: A link to download the Unity package (code, shader and 3D models) is provided at the end of the tutorial.