Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building an RPG with Unity 2018

You're reading from   Building an RPG with Unity 2018 Leverage the power of Unity 2018 to build elements of an RPG.

Arrow left icon
Product type Paperback
Published in Jul 2018
Publisher Packt
ISBN-13 9781788623469
Length 366 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Vahé Karamian Vahé Karamian
Author Profile Icon Vahé Karamian
Vahé Karamian
Arrow right icon
View More author details
Toc

Inverse Kinematics


Inverse Kinematics (IK) is important in game programming. It is typically used to make the character's movement more realistic. One of the main uses of IK is the calculation of the player's feet and how they relate to the ground they are standing on.

In short, IK is used to determine the position and rotation of the joints of a character based on a given position in space. For instance, to make sure the foot of a player lands properly on the terrain it is walking on.

Unity has a built-in IK system that can be used to do some basic calculations in this regard. Let's go ahead and implement the foot IK for our character. There are a few things that you will need to set up before we can enable IK for our humanoid character.

The first thing to do is check your layer in the Animator Controller and use the Engine icon to enter the Settings window. Make sure that IK Pass is checked, as shown in the following screenshot. You will also need to provide a Mask if you have not done so...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime