Skip to content

7 angle direction is counter clockwise#8

Open
eqbic wants to merge 11 commits into
mainfrom
7-angle-direction-is-counter-clockwise
Open

7 angle direction is counter clockwise#8
eqbic wants to merge 11 commits into
mainfrom
7-angle-direction-is-counter-clockwise

Conversation

@eqbic
Copy link
Copy Markdown
Collaborator

@eqbic eqbic commented Jan 25, 2026

Token (and mobile) rotation from 0 - 359 degree clockwise

This PR fixes a token rotation bug where the rotation was calculated counterclockwise from 0 to -359 degree. To be more in line with common behaviour this is now changed to clockwise rotation.

Changes

  • Implement TuioTransform class which handles the position and rotation calculation in one place. Tuio behaviour scripts for tuio 11 and tuio 2 entities inherit from TuioTransform
  • the rotation goes from 0 - 359
    TuioTransform:
protected float Angle => ((-RectTransform.localEulerAngles.z + 360f) % 360f) * Mathf.Deg2Rad;
  • make rotation clockwise:
    MouseScroller.cs
_rectTransform.Rotate(Vector3.back, scrollDelta * modifier);

Other changes

  • update unity version and packages
  • update to new TuioNet version. (which uses the ILogger interface for logging now)
    • implement UnityLogger which is now used in websocket client
    • send individual OSC bundles for each profile in Tuio 1.1
  • dragging of objects is now restricted to left mouse button

@eqbic eqbic linked an issue Jan 25, 2026 that may be closed by this pull request
eqbic added 3 commits January 25, 2026 11:56
…counter-clockwise

# Conflicts:
#	Assets/Scripts/Tuio/Tuio11/Tuio11ObjectBehaviour.cs
#	Assets/Scripts/Tuio/Tuio20/Tuio20TokenBehaviour.cs
#	Assets/UniversalRenderPipelineGlobalSettings.asset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Angle direction is counter clockwise

1 participant