Mister_M
09-16-23, 03:27 AM
The general idea is to add a child node which will turn in the opposite direction than the turret, hence constantly keeping the original turret's orientation. On this "orientation-keeping node" will be placed the AA gun (here A02)...
https://i.imgur.com/DQMGur8.gif
Here is a .dat file that I've built to show you how this works (Note: this .dat file must be placed into the Library folder in order that the AnimationObject is found by SH3).
D/L link: https://www.mediafire.com/file/4exh4uj9czl04gy/CounterRotation.dat/file
https://i.imgur.com/7ior9mf.png
Picture 1: the name must be the same as the name written in the AnimationObject (cf. picture 3).
https://i.imgur.com/d69P5tf.png
Picture 2: names must be the same.
https://i.imgur.com/4GWDTGz.png
Picture 3:
- the AnimName is the same but without < >.
- the <counter_rotation> node will turn in the opposite direction than the <turret> node.
- the Id are linking to the <notset> nodes.
- it is much simpler to have the coordinates of the <counter_rotation> node equal to zero in all boxes (X, Y, Z), else you will have to copy_paste these values into the KeyFrameAnimStartParams - "start" section). So, add a parent node with the proper placement; here, it is the AA_platform node which gives the correct placement).
https://i.imgur.com/BLBfott.png
Picture 4: rotation of the <turret> node along the Y axis (values are computed by the Calculator (quaternion calculator): choose Degrees first (important!), then enter an angle in degrees in the Y-axis boxe). Here: 180° and 360° which makes a complete turn in 2 seconds (arbitrary value).
http://i.imgur.com/1sRVxCN.png (https://imgur.com/1sRVxCN)
Picture 5:
- rotation of the <counter_rotation> node along the Y axis, in the opposite direction (-180°, -360°).
- times must be the same (here: 1 and 2 seconds).
NOTE: I didn't test but it's probably possible to add as many AA guns as you want on the turret (just add some extra <counter_rotation> nodes, with different names of course... (like <counter_rotation_1>, <counter_rotation_2> ...)).
https://i.imgur.com/DQMGur8.gif
Here is a .dat file that I've built to show you how this works (Note: this .dat file must be placed into the Library folder in order that the AnimationObject is found by SH3).
D/L link: https://www.mediafire.com/file/4exh4uj9czl04gy/CounterRotation.dat/file
https://i.imgur.com/7ior9mf.png
Picture 1: the name must be the same as the name written in the AnimationObject (cf. picture 3).
https://i.imgur.com/d69P5tf.png
Picture 2: names must be the same.
https://i.imgur.com/4GWDTGz.png
Picture 3:
- the AnimName is the same but without < >.
- the <counter_rotation> node will turn in the opposite direction than the <turret> node.
- the Id are linking to the <notset> nodes.
- it is much simpler to have the coordinates of the <counter_rotation> node equal to zero in all boxes (X, Y, Z), else you will have to copy_paste these values into the KeyFrameAnimStartParams - "start" section). So, add a parent node with the proper placement; here, it is the AA_platform node which gives the correct placement).
https://i.imgur.com/BLBfott.png
Picture 4: rotation of the <turret> node along the Y axis (values are computed by the Calculator (quaternion calculator): choose Degrees first (important!), then enter an angle in degrees in the Y-axis boxe). Here: 180° and 360° which makes a complete turn in 2 seconds (arbitrary value).
http://i.imgur.com/1sRVxCN.png (https://imgur.com/1sRVxCN)
Picture 5:
- rotation of the <counter_rotation> node along the Y axis, in the opposite direction (-180°, -360°).
- times must be the same (here: 1 and 2 seconds).
NOTE: I didn't test but it's probably possible to add as many AA guns as you want on the turret (just add some extra <counter_rotation> nodes, with different names of course... (like <counter_rotation_1>, <counter_rotation_2> ...)).