I've recently been learning about rigid body systems, and while I'm making some progress, I'm still confused about certain things because I can't find information or can't test them. For example, rigid body rotation. The information I've found teaches how to rotate with a servo, similar to landing gear or ailerons, but I want to try making the rigid body rotate due to inertia. Is there a way to achieve this? Currently, my work only results in the rigid body translating along a certain axis.
How can a rigid body be made to rotate due to inertia?
-
-
-
see here: https://www.aerofly.com/dokuwiki/
<[jointlinear][JointlinearFuselagePilotCameraShake][]
<[string8][Body0][Fuselage]>
<[string8][Body1][PilotCameraShakeRaw]>
<[tmvector3d][X0][ 1.0 0.0 0.0 ]>
<[tmvector3d][Y0][ 0.0 1.0 0.0 ]>
<[tmvector3d][Z0][ 0.0 0.0 1.0 ]>
<[tmvector3d][R0][ 31.699 0.52 0.7096 ]>
<[float64][Kfx][11400.0]>
<[float64][Kfy][1140.0]>
<[float64][Kfz][11451400.0]>
<[float64][Dfx][700.0]>
<[float64][Dfy][800.0]>
<[float64][Dfz][500.0]>
<[float64][Ktx][0.000000000001]>
<[float64][Kty][0.000000000001]>
<[float64][Ktz][0.000000000001]>
<[float64][Dtx][0.00000001]>
<[float64][Dty][0.00000001]>
<[float64][Dtz][0.1]>
<[float64][ForceMax][40000000.0]>
<[float64][TorqueMax][30000000.0]>
>
I changed the spring damping values in this code like this, and after binding it to the viewpoint, only the viewpoint translates due to inertia. The AI says that dt and kt are related to rotation, but even after changing the values so much, there's still no change. -
What is this rigidbody <[string8][Body1][PilotCameraShakeRaw]> ?
What do you actually want to implement? Am I right that it's about a camera shake when landing?
In that case, I would rather change the parameters in an outsourced 'parameters.tmd' (the example refers to 'b777f'):
Code
Display More<[file][][] <[modelmanager][][] <[pointer_list_tmuniverse][DynamicObjects][] <[camera_head][CameraPilot][] <[string8][Body][Fuselage]> <[tmvector3d][R0][ 28.966 0.53 0.87 ]> <[tmvector3d][Direction][ 1.0 0.0 -0.2 ]> <[float64][Kf][40.0]> <[float64][Df][1.00]> <[float64][Kt][0.04]> <[float64][Dt][0.02]> <[bool][InCockpit][true]> <[bool][Overhead][true]> <[string8][Tags][cockpit pilot left]> > > > > -
What is this rigidbody <[string8][Body1][PilotCameraShakeRaw]> ?
What do you actually want to implement? Am I right that it's about a camera shake when landing?
In that case, I would rather change the parameters in an outsourced 'parameters.tmd' (the example refers to 'b777f'):
Code
Display More<[file][][] <[modelmanager][][] <[pointer_list_tmuniverse][DynamicObjects][] <[camera_head][CameraPilot][] <[string8][Body][Fuselage]> <[tmvector3d][R0][ 28.966 0.53 0.87 ]> <[tmvector3d][Direction][ 1.0 0.0 -0.2 ]> <[float64][Kf][40.0]> <[float64][Df][1.00]> <[float64][Kt][0.04]> <[float64][Dt][0.02]> <[bool][InCockpit][true]> <[bool][Overhead][true]> <[string8][Tags][cockpit pilot left]> > > > ><[rigidbody][PilotCameraShakeRaw][]
<[float64][Mass][55.0]>
<[tmvector3d][InertiaLength][ 0.2 0.41 0.88 ]>
<[tmvector3d][R0][ 31.699 0.52 0.7096 ]>
<[tmmatrix3d][B0][ 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 ]>
>
I want the camera to create the effect shown in the image below due to inertia.But it's clearly not that simple.💀
-
OK. Which aircraft?
-
OK. Which aircraft?
I plan to make this mod for the A380.
-
-
- Official Post
Check that the joint R0 position is not in the center of the rigidbody, otherwise the forces can't create a torque around the center of the object. Also check that the camera uses the rigidbody as "Body", not the fuselage rigidbody.
-
Check that the joint R0 position is not in the center of the rigidbody, otherwise the forces can't create a torque around the center of the object. Also check that the camera uses the rigidbody as "Body", not the fuselage rigidbody.
<[jointlinear][JointlinearFuselagePilotCameraShake][]
<[string8][Body0][Fuselage]>
<[string8][Body1][PilotCameraShakeRaw]>
<[tmvector3d][X0][ 1.0 0.0 0.0 ]>
<[tmvector3d][Y0][ 0.0 1.0 0.0 ]>
<[tmvector3d][Z0][ 0.0 0.0 1.0 ]>
<[tmvector3d][R0][ 31.699 0.52 0.7096 ]>
Adjusting R0 here affects the position of the view I'm adjusting, and I'm not sure why. Previously, when I changed it from 0.7096 to 0.4, the view was pressed directly onto the seat.
(Okay, I'm still a bit confused about this 🤔)
-
R0 indicates the position in the aircraft relative to the zero point:
- 31.699 = x-axle = 31.699 m before the zero point
- 0.52 = y-axle = 0.52 m Left of the zero point
- 0.7096 = z-axle = 0.7096 above the zero point
On the A380, the camera has this position data for the pilot: <[tmvector3d][R0][ 31.75 0.52 0.68 ]>. If you reduce the z value to 0.4, you are just above the seat.
-
Check that the joint R0 position is not in the center of the rigidbody, otherwise the forces can't create a torque around the center of the object. Also check that the camera uses the rigidbody as "Body", not the fuselage rigidbody.
Hi there, how do I perform a left or right turn when approaching the runway?
In parameter.tmd
KT and DT nothing happened when I changed the value it's still straight
-
- Official Post
Hi there, how do I perform a left or right turn when approaching the runway?
In parameter.tmd
KT and DT nothing happened when I changed the value it's still straight
Kt and Dt change the torsion stiffness and damping. That doesn't change where the camera looks, it only changes how fast the camera rotation follows the Body rotation and how well that is damped.
-
Kt and Dt change the torsion stiffness and damping. That doesn't change where the camera looks, it only changes how fast the camera rotation follows the Body rotation and how well that is damped.
How can I fix this? I’ve spent five months trying to get the camera's left-and-right rotation working. I suspect it's connected to the fuselage, which is why it won't rotate. Could you help me get it working?
-
- Official Post
You need to add a rigidbody that rotates. The camera then attaches to that rigidbody, not the fuselage.
-
You need to add a rigidbody that rotates. The camera then attaches to that rigidbody, not the fuselage.
I've done this, except it made the aircraft violently unstable. Like immediate right-hand flat spins.
-
- Official Post
I've done this, except it made the aircraft violently unstable. Like immediate right-hand flat spins.
Check the joint spring and damping constants that you used for the camera/head rigidbody joint connection to the fuselage. These constants should be quite low for a light camera body.