top of page
  • Facebook
  • Twitter
  • Instagram

look at 2D

Transform enemy; 

enemy.rotation = TScriptUt.LookAt2D(enemy, lookPoint);

​

This is a feature that can make an object look at a point (vector 3).To use this you need to specify the object to rotate as a transform(enemy) point and a vector3(lookPoint). This will return a Quaternion.Euler of the transforms default x and y rotations but the z rot will be facing towards the point.

bottom of page