Adding kinematics on pendulum like Object
Model-Pose1
Yesterday, I tried to dive deeper into the kinematics of more "complex" objects in Unity. However, I reached my limits when working on the kinematics of the model in the attached image, and I wanted to ask for your assessment of the complexity involved.
From my experience, chaining linear and independent movements doesn't seem to be a problem. However, combining rotational and linear movements appears to be more complex.
The model is actually a relatively simple construction. On a base-plate, there is a rotatable and driven turret. At the top of this turret, there is a shaft driven by a motor, which, through a connecting rod-like mechanism, is supposed to exert a linear movement on the "sleeve" around the turret. I have illustrated this with two images.
I have tried various combinations of kinematic chains and also tested the use of Unity's internal joints like the "Hinge Joint." I always got to the point where I still needed to add the linear movement of the sleeve. However, I couldn't implement this final step under the conditions of the existing movements.
In general, I have the following questions:
- Is it possible to use the joints provided by Unity in combination with the drives from Realvirtual?
- Are there any similar "joints" from Realvirtual that constrain kinematic movement (i.e., without additional drive)?
- I had the feeling that a functioning kinematics heavily depends on the hierarchical arrangement of the game objects. It seems that the linear constraint of the sleeve to the turret doesn't work due to the hierarchy. Do you have any tips or rules that need to be followed, and is such a kinematic chain as desired in the model even possible?
I have also attached the STEP file of this model and would appreciate any feedback.
Answer
I think the questions are somehow similar to the questions in this post:
https://forum.realvirtual.io/communities/1/topics/654-unity-physics-and-kinematics
Maybe more in detail concerning your problem:
Physical joints are always unstable per se and often only work without oscillations if the fixed update is very small (e.g. 1ms - disadvantage: performance of the model then quickly reaches its limit).
In general: If possible, do not use physical joints. If physical joints are used, then only as a "slave" and the end position is always guaranteed via a drive (e.g. delta pickers, drive for the X,Y,Z position, physical joints for the joints and rods).
I would control the example model myself purely via drives - which are then connected to each other via CAM or GEAR.
Hi,
Thanks for the answer. I got it working by now with the CAM Drives and a little kinematic configuration.
However, I encountered one small problem during the runtime of the scene.
When I run the Master Drive, it seems like the Slave Drive is falling behind by 3 steps or something like this. This results in the picture shown in Figure 1. As soon as I stop the Master Drive, the Slave Drive can catch up, and everything looks perfect again (Figure 2).
Is there a trick to stop the Slave Drive from lagging behind?
Thanks and best regards,
Gary Hildebrandt
Figure 1
Figure 2
Thanks, we know this issue - it is already fixed - if you need a beta you can get access - otherwise it will be fixed in about 1 week with the next official release.
Hi,
just installed the new Version of the realvirtual Package (04.07.2024).
However, the error with the misaligned parts persists. However, it seems to get better when reducing the drive speed and worse on increasing it.
Greetings Gary
We recognize that despite the significant changes made in the last release to ensure the drive fixed update sequence for cams and gears, there is still a bug affecting functionality.
After investigation, we have identified the solution. To resolve this issue, please modify the Drive script by adding !issubdrive
around line 880. This fix will also be included in our upcoming release.
Customer support service by UserEcho
We recognize that despite the significant changes made in the last release to ensure the drive fixed update sequence for cams and gears, there is still a bug affecting functionality.
After investigation, we have identified the solution. To resolve this issue, please modify the Drive script by adding
!issubdrive
around line 880. This fix will also be included in our upcoming release.