Skip to content

AybarsBarut/objectangledetection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Unity Object Angle Detection Script

type tech status

Unity Object Angle Detection Script is a Unity MonoBehaviour for reading, setting, adding, and smoothly animating a GameObject Z-axis angle, useful for gauges, needles, indicators, and rotation-based UI/gameplay systems.

Designed for Unity beginners, gameplay programmers, UI tool builders, simulation developers, and anyone needing simple angle control in 2D or 3D scenes.

Features

  • Set a GameObject Z rotation directly from code.
  • Add or subtract angle deltas from the current rotation.
  • Smoothly animate angle changes over time.
  • Expose the normalized 0-360 Z angle as a public value.
  • Use keyboard shortcuts for quick testing and calibration.

Installation

Copy pivot_angle_script.cs into your Unity project and attach it to the GameObject whose Z rotation you want to control.

Usage

Call SetZAngle, AddZAngle, or SetZAngleSmooth from your own scripts, or use the configured test keys for manual angle changes.

SEO Keywords

Unity angle detection, Unity Z rotation script, Unity gauge needle script, Unity rotation controller, Unity MonoBehaviour angle helper, object angle detection Unity

GitHub Topics

unity, csharp, math, rotation, trigonometry, gamedev

Repository

View on GitHub

About

Unity C# object angle detection and Z-rotation helper script for gauges, needles, indicators, and smooth angle animation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages