top of page
Search

C# AimConstraint in Unity

  • Writer: Admin
    Admin
  • Sep 1, 2020
  • 1 min read

So I was taking a look at this great procedural animation tutorial and I was surprised that he used C# to aim the geckos head instead of using the aimConstraint that is available in unity.

But I decided that it was a worthwhile exercise to recreate the aimConstraint since I hadn't gotten to work with matrices in unity yet, and I needed to get some practice on working with it's left handed coordinate system and column-based matrices.

into things. It took some time reading the documentation (to find out that the matrix is column-based not row based) but I got everything working the way I wanted.

It was a very easy excercise math-wise since I've done this sort of thing many times in Maya, but finding out how Unity wants you to think was very insightful. Maya is very matrix-centric while Unity seems more quaternion-centric, which is a great change of pace.

 
 
 

Recent Posts

See All
weightRemapper Node

Unlike in a skinCluster-based system if you use a translateUVN deformer you'll need to define which maps are left/right pairs for each...

 
 
 
Featured Posts
Recent Posts
Archive
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page