Using AtomPro28, BB2, SSC32, with PS2. and running Xans Phoenix code v2.0.
when doing body rotations, tilts and rolls, with the left J/Stick, how can i change the Rotation point using the right stick?
what i mean is ‘while doing these movements’ instead of just rotating from the center of the body XYZ id like to move the center point of rotation around on the fly using the right J/Stick.
[code]BodyIKLeg var nib
BodyIK [PosX, PosZ, PosY, RotationY, BodyIKLeg]
;Calculating totals from center of the body to the feet
CPR_X = cOffsetX(BodyIKLeg)+PosX
CPR_Y = PosY + BodyRotOffsetY ; Define centerpoint for rotation along the Y-axis
CPR_Z = cOffsetZ(BodyIKLeg) + PosZ + BodyRotOffsetZ
;Successive global rotation matrix:
;Math shorts for rotation: Alfa (A) = Xrotate, Beta (B) = Zrotate, Gamma (G) = Yrotate
;Sinus Alfa = sinA, cosinus Alfa = cosA. and so on…
;First calculate sinus and cosinus for each rotation:
GOSUB GetSinCos [BodyRotX1+TotalXBal1]
SinG4 = Sin4
CosG4 = Cos4
For shifting/changing the CPR you only need to set the variable BodyRotOffsetZ, BodyRotOffsetY. If you need to set the X you’ll need to add that variable. It might be a bit hard to change all 3 coordinates at the same time with only one 2DOF joystick though.