ExtendRealityLtd / ExtendRealityLtd/Tilia.Interactions.Controllables.Unity

Angular Transform Drive is controllable when interactor is offset from the interactable

Open
#235 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
9
Forks
3
PR merge metrics
No merged PRs in 30d

Description

The Angular Transform Drive (when a lever is made for example)

will control the angular rotation of the target even when the interactor is offset from the interactable

![angulartransformissue](https://user-images.githubusercontent.com/1029673/225594735-e9f5d33a-2791-4685-b574-8f979132d4a0.gif)

This shows the issue that the drive will start rotating when the interactor overshoots and starts pushing back the other way.

The drive shouldn't rotate until the interactor is at least back in line with the lever

![image](https://user-images.githubusercontent.com/1029673/225596182-c8e0801b-c529-4dcc-af1d-43bce0f37965.png)

The AngularJointDrive works correctly in this way:

![angularjointissue](https://user-images.githubusercontent.com/1029673/225596837-df9fa423-62ec-4e51-893e-696e150fdd94.gif)

The issue is going to lie in the `Zinnia.Tracking.Follow.Modifier.Property.Rotation.TransformPositionDifferenceRotation` class, most likely in the `CalculateAngle` method.

It takes the target position (the lever) and the source (interactor) previous position and the source current position to work out the heading of the interactor to determine the angle.

it needs to only start applying the angle when the interactor is within a threshold of the actual lever perhaps.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.