Skip to content

hamdanbasri/LookAtAxisController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Look At Axis Controller

Logo

Easily set the axis for your LookAt functions.


Table of Contents
  1. About
  2. Functions
  3. Getting Started
  4. Additional Notes
  5. Example
  6. Contact

About

Made with Unity C# Beginner
Ever wanted to only look at on a specific axis?
This code is here just to do that.

Functions

  • Set a specific axis to look at your target.

Getting Started

Visitors

  • Open Unity and add a Cube to the scene and rename it to Head.
  • Attach the LookAtAxisController.cs script to the Head as a component.
  • Add another Cube to the scene and name it to LookAtTarget.
  • Click on Head in the hierarchy.
  • Drag the LookAtTarget in the Hierarchy on to the Target section in the inspector.
  • Select an axis to specificy the direction to look at.
  • Press Play in your editor, move around the Target and see the magic of LookAtAxisController.

Additional Notes

  • All axis is the same as the normal Look At function.

Example

LerpControlInspector

Quick and easy setup.


Variable Annotation
Target Drag and drop the target to Look At.
X Axis Look at only on the X-Axis.
Y Axis Look at only on the Y-Axis.
Z Axis Look at only on the Z-Axis.
All Axis Look at on all Axis.

Contact

Twitter LinkedIn

(back to top)

About

Easily LookAt objects by locking the look direction on a specific axis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages