-
Notifications
You must be signed in to change notification settings - Fork 4
The AngularJointDrive's InitialTarget feature seems to be broken when the container is rotated before being instantiated #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think this is an instantiation issue, perhaps a race condition where when the door is created by script, the order of initialisation is different in unity causing the rotation logic to not occur. |
One workaround for now is set your and then in your script do:
This will apply the rotation required after the instantiation. I know it's not an ideal work around, but may help during the further investigation required for this issue. |
I want to add an observation if it helps : Thank you for the workaround :) |
I don't think it's a velocity transfer issue. I think it's a race condition where the "move to initial position" isn't being triggered by the time the object is finished instantiated. |
Ok I just shared a thought in case it'd help. The correlation between the rotation and the direction the door opens is still leaving me perplexed tho. |
Environment
"io.extendreality.tilia.camerarigs.spatialsimulator.unity": "1.4.1",
"io.extendreality.tilia.camerarigs.trackedalias.unity": "1.6.0",
"io.extendreality.tilia.interactions.controllables.unity": "1.12.1",
"io.extendreality.tilia.interactions.interactables.unity": "1.17.0",
"io.extendreality.tilia.mutators.collisionignorer.unity": "1.2.0",
Steps to reproduce
It should get the door to be shut (y angle to 0) at start.
Expected behavior
With both prefabs being the same but the root gameobject y axis rotation, the door should spawn with the same initial target value. The only thing changing should be the overal rotation of the container of the door parts (frame + door).
Current behavior
Now, with no rotation set is properly closed, while the door with the root gameobject slightly rotated on the y axis is opened at start.
Gif illustration :

The text was updated successfully, but these errors were encountered: