ThaI am using an animation.
Here TURN_proc is the variable:
SetAnimation (anim_axle1, TURN_proc);
// Wheel1
static UINT WGrp1[2] = {59,70};
wheel1 = new MGROUP_ROTATE (0,WGrp1, 2, _V(-1.529,-1.759,1.494), _V(1,0,0), (float)(360*RAD));
// rear Left Wheel Turn
static UINT TuGrp1[1] = {66};
static MGROUP_ROTATE tu1 (0,TuGrp1, 1, _V(-1.5363,-1.759,1.494), _V(0,1,0), (float)(360*RAD));
anim_axle1 = CreateAnimation (0.0);
parent1=AddAnimationComponent (anim_axle1, 0, 1, &tu1);
anim_wheel1 = CreateAnimation (0.0);
AddAnimationComponent (anim_wheel1, 0, 1, wheel1, parent1);
So in this example the axle1 rotates 360 degrees
---------- Post added at 04:38 PM ---------- Previous post was at 03:00 PM ----------
ThaI am using an animation.
Here TURN_proc is the variable:
SetAnimation (anim_axle1, TURN_proc);
// Wheel1
static UINT WGrp1[2] = {59,70};
wheel1 = new MGROUP_ROTATE (0,WGrp1, 2, _V(-1.529,-1.759,1.494), _V(1,0,0), (float)(360*RAD));
// rear Left Wheel Turn
static UINT TuGrp1[1] = {66};
static MGROUP_ROTATE tu1 (0,TuGrp1, 1, _V(-1.5363,-1.759,1.494), _V(0,1,0), (float)(360*RAD));
anim_axle1 = CreateAnimation (0.0);
parent1=AddAnimationComponent (anim_axle1, 0, 1, &tu1);
anim_wheel1 = CreateAnimation (0.0);
AddAnimationComponent (anim_wheel1, 0, 1, wheel1, parent1);
So in this example the axle1 rotates 360 degrees
update code:
VECTOR3 dir = {0,0,0};
VECTOR3 dirR = {0,0,0};
th_main = CreateThruster (_V(0,0,0), dir, MAXMAINTH, TANK, ISP);
CreateThrusterGroup (&th_main, 1, THGROUP_MAIN);
th_retro = CreateThruster (_V(0,0,0), dirR, MAXRETROTH, TANK, ISP);
CreateThrusterGroup (&th_retro, 1, THGROUP_RETRO);
SetThrusterDir (th_main, _V(sin(2*PI*TURN_proc), 0, cos(2*PI*TURN_proc)));
the direction changes. but I can't get the vessel to move. It has fuel
const double FUELMASS = 1000;
const double ISP = 2.5e5;
const double MAXMAINTH = 6e18;
const double MAXRETROTH = 6e18;