-
Notifications
You must be signed in to change notification settings - Fork 4
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
AngularDrives not raising TargetValueReached event #78
Comments
I noticed that the virtual function SetDriveTargetValue() is only overridden in the LinearTransform/JointDrive scripts while the angular once don't. |
I've tried recreating this in Unity 2018.3.14f and I cannot recreate the issue. I get the Target Value Reached every time |
Found the problem! Once the object is Once the |
That should be your solution then, if your precision is so small that the threshold is too large then lowing the threshold is the correct approach |
Is that behaviour intended? I mean, I would also expect the Even if it fixes it for me, I see a problem with higher |
You need to provide better steps to recreate the issue then, because I followed your original steps and could not recreate the issue you are talking about |
As you already said:
and I just wanted to know if the behaviour I described is intented. If it is not, what do yo mean with "better" ? I have already asked what additional information could be helpful to make things clearer. |
The original steps outlined in this issue ticket do not reproduce the problem that has been mentioned. So it is not certain to know if there is a bug or not. I have followed the 7 steps exactly and the bug does not occur. So there must be some missing step or configuration to cause the issue that you are seeing. If you can recreate the problem with the exact steps then I can attempt to recreate it and confirm if there is in fact any issue. |
Updated to Tilia Interactions Controllables Unity 1.10.14
My goal is to use the StepValue as the new TargetValue, everytime a StepValue changes as I rotate the drive around. Once I ungrab the drive, it should automatically rotate towards the StepValue. To achieve that I did the following: a. I referenced the SetTargetValueByStepValue function of the AngularDriveFacade inside the StepValueChanged UnityEvent of the same AngularDriveFacade in the inspector and left everything else as it is When I hit play , grab the drive and rotate it around, I can see the TargetValue changes as expected, once a StepValue changed. b. To make the Drive rotate towards its new TargetValue, MoveToTargetValue needs to be active, but only if I dont't grab the drive. So I set MoveToTargetValue to false/true once I grab/ungrab the Interactable of the Drive, by using the appropriate Unity Events of the InteractableFacade inside the Drive When I hit play, grab the drive, rotate it around and release the grab, I can see the Drive rotateing towards the current TargetValue automatically.
This is how my AngularDriveFacade looks like right now: This is the Internal AngularJointDrive. It's Moment is processed in FixedUpdate and also no changes made in the component itself: And the InteractableFacade : When I hit play, grab the Drive, rotate it around, ungrab it and wait for it to reach its TargetValue, there is NO reaction in the console.
When I hit play, grab the Drive, rotate it around, ungrab it and wait for it to reach its TargetValue, there is the expected reaction in the console. Here are my Physics Settings of the project: I really don't how to better explain the steps I do to recreate this issue for me. All the other components of the Drive prefab haven't been touched. If there is something I missed that could be helpful, please let me now. Thx |
Environment
Unity 2020.1
Tilia Controllables 1.10.13
Issue:
The TargetValueReached UnityEvent won't get raised on an AngularJoint/TransformDrive when the TargetValue is set by code.
Reproduce:
Place an Interactions.AngularJointDrive prefab in the scene.
Hook the public SetTargetValueByStepValue() function in the Facades StepValueChanged UnityEvent.
Enable/Disable the Drives public MoveToTargetValue property in the Ungrabbed/Grabbed UnityEvents in the Interactable.
Call a Debug function from the TargetValueReached UnityEvent of the Drive.
Move the Drive around by grabbing it with an Interactor and notice the TargetValueReached event not being raised, even if the Drive obviously reaches its target value.
Do same with LinearJointDrive prefab.
Notice TargetValueReached event is getting raised properly on the linear drive.
Greetings!
The text was updated successfully, but these errors were encountered: