|
|
|
|
|
|
/// </summary>
|
|
|
|
public class OrientationCubeController : MonoBehaviour |
|
|
|
{ |
|
|
|
//Public method to allow Agent to set look rotation of this transform
|
|
|
|
//Update position and Rotation
|
|
|
|
dirVector.y = 0; //flatten dir on the y. this will only work on level surfaces
|
|
|
|
dirVector.y = 0; //flatten dir on the y. this will only work on level, uneven surfaces
|
|
|
|
var lookRot = |
|
|
|
dirVector == Vector3.zero |
|
|
|
? Quaternion.identity |
|
|
|