Little ragdoll using Tokamak demo (+ ugly ass src)

Miscellaneous Forums/Blitz Showcase/Little ragdoll using Tokamak demo (+ ugly ass src)

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Little thing i whipped up yesterday, it's ugly ass, the joint limits are screwed upish, etc .. but it works :) thought i'd show it off to gain some disrespect ;)

Requires latest Tokamak wrapper by Sweenie.


Camera can be moved with the cursors keys and A+Z, start the simulation by pressing Enter.


Const Rigid_Bodies=100,Animated_Bodies=5
TOKSIM_SetRigidBodiesCount Rigid_Bodies
TOKSIM_SetAnimatedBodiesCount Animated_Bodies
TOKSIM_SetRigidParticleCount 0
TOKSIM_SetControllersCount 0
TOKSIM_SetGeometriesCount Rigid_bodies+Animated_Bodies
TOKSIM_CreateSimulator(0,-10,0)


Graphics3D 640,480,0,2
SetBuffer BackBuffer()

camera = CreateCamera()

light = CreateLight()



ground = CreateCube()
EntityColor ground,Rand(50,200),Rand(50,200),Rand(50,200)
ScaleEntity ground,50,5,50
PositionEntity ground,0,-50,0

ground_ab = TOKAB_Create()
TOKAB_AddBox(ground_ab,100.0,10.0,100.0)
TOKAB_SetPosition(ground_ab,0.0,-50.0,0.0)


wall1 = CreateCube()
EntityColor wall1,Rand(50,200),Rand(50,200),Rand(50,200)
ScaleEntity wall1,50,100,5
PositionEntity wall1,0,-50,50

wall1_ab = TOKAB_Create()
TOKAB_AddBox(wall1_ab,100.0,200.0,10.0)
TOKAB_SetPosition(wall1_ab,0.0,-50.0,50.0)



;feet
foot1 = CreateCube()
foot2 = CreateCube()

ScaleEntity foot1,1,.2,1
ScaleEntity foot2,1,.2,1

foot1_rb = TOKRB_Create()
foot2_rb = TOKRB_Create()

foot1_geom = TOKRB_AddBox(foot1_rb,2,0.4,2)
foot2_geom = TOKRB_AddBox(foot2_rb,2,0.4,2)

TOKRB_SetPosition foot1_rb,-2,0,0
TOKRB_SetPosition foot2_rb,2,0,0

TOKRB_SetLinearDamping foot1_rb,0.001
TOKRB_SetAngularDamping foot1_rb,0.002
TOKRB_SetMass foot1_rb,4.0
TOKRB_SetBoxInertiaTensor foot1_rb,2.0,0.4,2.0,4.0

TOKRB_SetLinearDamping foot2_rb,0.001
TOKRB_SetAngularDamping foot2_rb,0.002
TOKRB_SetMass foot2_rb,4.0
TOKRB_SetBoxInertiaTensor foot2_rb,2.0,0.4,2.0,4.0


;calves
calve1 = CreateCylinder()
calve2 = CreateCylinder()

ScaleEntity calve1,.5,2,.5
ScaleEntity calve2,.5,2,.5

calve1_rb = TOKRB_Create()
calve2_rb = TOKRB_Create()

calve1_geom = TOKRB_AddCylinder(calve1_rb,1,4)
calve2_geom = TOKRB_AddCylinder(calve2_rb,1,4)

TOKRB_SetPosition calve1_rb,-2,2,.5
TOKRB_SetPosition calve2_rb,2,2,.5



TOKRB_SetLinearDamping calve1_rb,0.001
TOKRB_SetAngularDamping calve1_rb,0.002
TOKRB_SetMass calve1_rb,4.0
TOKRB_SetCylinderInertiaTensor calve1_rb,1.0,4.0,4.0

TOKRB_SetLinearDamping calve2_rb,0.001
TOKRB_SetAngularDamping calve2_rb,0.002
TOKRB_SetMass calve2_rb,4.0
TOKRB_SetCylinderInertiaTensor calve2_rb,1.0,4.0,4.0


;thighs
thigh1 = CreateCylinder()
thigh2 = CreateCylinder()

ScaleEntity thigh1,.75,2,.75
ScaleEntity thigh2,.75,2,.75

thigh1_rb = TOKRB_Create()
thigh2_rb = TOKRB_Create()

thigh1_geom = TOKRB_AddCylinder(thigh1_rb,1.5,4)
thigh2_geom = TOKRB_AddCylinder(thigh2_rb,1.5,4)

TOKRB_SetPosition thigh1_rb,-2,6,.5
TOKRB_SetPosition thigh2_rb,2,6,.5

TOKRB_SetLinearDamping thigh1_rb,0.001
TOKRB_SetAngularDamping thigh1_rb,0.002
TOKRB_SetMass thigh1_rb,4.0
TOKRB_SetCylinderInertiaTensor thigh1_rb,1.5,4.0,4.0

TOKRB_SetLinearDamping thigh2_rb,0.001
TOKRB_SetAngularDamping thigh2_rb,0.002
TOKRB_SetMass thigh2_rb,4.0
TOKRB_SetCylinderInertiaTensor thigh2_rb,1.5,4.0,4.0


;body
body = CreateCube()

ScaleEntity body,3,3,1

body_rb = TOKRB_Create()

body_geom = TOKRB_AddBox(body_rb,6,6,2)

TOKRB_SetPosition body_rb,0,11,0

TOKRB_SetLinearDamping body_rb,0.001
TOKRB_SetAngularDamping body_rb,0.002
TOKRB_SetMass body_rb,8.0
TOKRB_SetBoxInertiaTensor body_rb,6.0,6.0,2.0,8.0


;neck
neck = CreateCylinder()

ScaleEntity neck,.75,.5,.75

neck_rb = TOKRB_Create()

neck_geom = TOKRB_AddCylinder(neck_rb,1.5,1)

TOKRB_SetPosition neck_rb,0,14.5,0

TOKRB_SetLinearDamping neck_rb,0.001
TOKRB_SetAngularDamping neck_rb,0.002
TOKRB_SetMass neck_rb,2.0
TOKRB_SetCylinderInertiaTensor neck_rb,1.5,1,2.0


;head
head = CreateSphere()

ScaleEntity head,1.5,1.5,1.5

head_rb = TOKRB_Create()

head_geom = TOKRB_AddSphere(head_rb,3)

TOKRB_SetPosition head_rb,0,16,0

TOKRB_SetLinearDamping head_rb,0.001
TOKRB_SetAngularDamping head_rb,0.002
TOKRB_SetMass head_rb,6.0
TOKRB_SetSphereInertiaTensor head_rb,3.0,6.0


;upperarms
upper1 = CreateCylinder()
upper2 = CreateCylinder()

ScaleEntity upper1,.75,1.5,.75
ScaleEntity upper2,.75,1.5,.75

upper1_rb = TOKRB_Create()
upper2_rb = TOKRB_Create()

upper1_geom = TOKRB_AddCylinder(upper1_rb,1.5,3)
upper2_geom = TOKRB_AddCylinder(upper2_rb,1.5,3)

TOKRB_SetRotation upper1_rb,0,0,90
TOKRB_SetRotation upper2_rb,0,0,90

TOKRB_SetPosition upper1_rb,-4.5,13,0
TOKRB_SetPosition upper2_rb,4.5,13,0

TOKRB_SetLinearDamping upper1_rb,0.001
TOKRB_SetAngularDamping upper1_rb,0.002
TOKRB_SetMass upper1_rb,4.0
TOKRB_SetCylinderInertiaTensor upper1_rb,1.5,3.0,4.0

TOKRB_SetLinearDamping upper2_rb,0.001
TOKRB_SetAngularDamping upper2_rb,0.002
TOKRB_SetMass upper2_rb,4.0
TOKRB_SetCylinderInertiaTensor upper2_rb,1.5,3.0,4.0


;lowerarms
lower1 = CreateCylinder()
lower2 = CreateCylinder()

ScaleEntity lower1,.5,1.5,.5
ScaleEntity lower2,.5,1.5,.5

lower1_rb = TOKRB_Create()
lower2_rb = TOKRB_Create()

lower1_geom = TOKRB_AddCylinder(lower1_rb,1,3)
lower2_geom = TOKRB_AddCylinder(lower2_rb,1,3)

TOKRB_SetRotation lower1_rb,0,0,90
TOKRB_SetRotation lower2_rb,0,0,90

TOKRB_SetPosition lower1_rb,-7.5,13,0
TOKRB_SetPosition lower2_rb,7.5,13,0

TOKRB_SetLinearDamping lower1_rb,0.001
TOKRB_SetAngularDamping lower1_rb,0.002
TOKRB_SetMass lower1_rb,4.0
TOKRB_SetCylinderInertiaTensor lower1_rb,1.0,3.0,4.0

TOKRB_SetLinearDamping lower2_rb,0.001
TOKRB_SetAngularDamping lower2_rb,0.002
TOKRB_SetMass lower2_rb,4.0
TOKRB_SetCylinderInertiaTensor lower2_rb,1.0,3.0,4.0


;hands
hand1 = CreateCube()
hand2 = CreateCube()

ScaleEntity hand1,.75,.75,.75
ScaleEntity hand2,.75,.75,.75

hand1_rb = TOKRB_Create()
hand2_rb = TOKRB_Create()

hand1_geom = TOKRB_AddBox(hand1_rb,1.5,1.5,1.5)
hand2_geom = TOKRB_AddBox(hand2_rb,1.5,1.5,1.5)

TOKRB_SetPosition hand1_rb,-9.5,13,0
TOKRB_SetPosition hand2_rb,9.5,13,0

TOKRB_SetLinearDamping hand1_rb,0.001
TOKRB_SetAngularDamping hand1_rb,0.002
TOKRB_SetMass hand1_rb,1.0
TOKRB_SetBoxInertiaTensor hand1_rb,1.5,1.5,1.5,1.0

TOKRB_SetLinearDamping hand2_rb,0.001
TOKRB_SetAngularDamping hand2_rb,0.002
TOKRB_SetMass hand2_rb,1.0
TOKRB_SetBoxInertiaTensor hand2_rb,1.5,1.5,1.5,1.0





; JOINTS

; feet to calves
foot1_jt = TOKJOINT_Create(2,foot1_rb,calve1_rb)
foot2_jt = TOKJOINT_Create(2,foot2_rb,calve2_rb)

TOKJOINT_SetPositionAndRotationWorld foot1_jt,-2,0,0,0,0,0
TOKJOINT_SetPositionAndRotationWorld foot2_jt,2,0,0,0,0,0

TOKJOINT_SetType foot1_jt,1
TOKJOINT_SetType foot2_jt,1

TOKJOINT_SetLowerLimit foot1_jt,0
TOKJOINT_SetUpperLimit foot1_jt,0.5
TOKJOINT_SetLowerLimit foot2_jt,0
TOKJOINT_SetUpperLimit foot2_jt,0.5

TOKJOINT_SetLowerLimit2 foot1_jt,0
TOKJOINT_SetUpperLimit2 foot1_jt,1
TOKJOINT_SetLowerLimit2 foot2_jt,0
TOKJOINT_SetUpperLimit2 foot2_jt,1

TOKJOINT_EnableLimit foot1_jt,True
TOKJOINT_EnableLimit foot2_jt,True

TOKJOINT_EnableLimit2 foot1_jt,True
TOKJOINT_EnableLimit2 foot2_jt,True

TOKJOINT_Enable foot1_jt,True
TOKJOINT_Enable foot2_jt,True


; calves to thighs
calve1_jt = TOKJOINT_Create(2,calve1_rb,thigh1_rb)
calve2_jt = TOKJOINT_Create(2,calve2_rb,thigh2_rb)

TOKJOINT_SetPositionAndRotationWorld calve1_jt,-2,4,0.5,0,0,0
TOKJOINT_SetPositionAndRotationWorld calve2_jt,2,4,0.5,0,0,0

TOKJOINT_SetType calve1_jt,1 
TOKJOINT_SetType calve2_jt,1 

TOKJOINT_SetLowerLimit calve1_jt,0
TOKJOINT_SetUpperLimit calve1_jt,0.5
TOKJOINT_SetLowerLimit calve2_jt,0
TOKJOINT_SetUpperLimit calve2_jt,0.5

TOKJOINT_SetLowerLimit2 calve1_jt,0
TOKJOINT_SetUpperLimit2 calve1_jt,1
TOKJOINT_SetLowerLimit2 calve2_jt,0
TOKJOINT_SetUpperLimit2 calve2_jt,1

TOKJOINT_EnableLimit calve1_jt,True
TOKJOINT_EnableLimit calve2_jt,True

TOKJOINT_EnableLimit2 calve1_jt,True
TOKJOINT_EnableLimit2 calve2_jt,True

TOKJOINT_Enable calve1_jt,True
TOKJOINT_Enable calve2_jt,True


; thighs to body
thigh1_jt = TOKJOINT_Create(2,thigh1_rb,body_rb)
thigh2_jt = TOKJOINT_Create(2,thigh2_rb,body_rb)

TOKJOINT_SetPositionAndRotationWorld thigh1_jt,-2,8,0.5,0,0,0
TOKJOINT_SetPositionAndRotationWorld thigh2_jt,2,8,0.5,0,0,0

TOKJOINT_SetType thigh1_jt,1
TOKJOINT_SetType thigh2_jt,1

TOKJOINT_SetLowerLimit thigh1_jt,0
TOKJOINT_SetUpperLimit thigh1_jt,0.5
TOKJOINT_SetLowerLimit thigh2_jt,0
TOKJOINT_SetUpperLimit thigh2_jt,0.5

TOKJOINT_SetLowerLimit2 thigh1_jt,0
TOKJOINT_SetUpperLimit2 thigh1_jt,1
TOKJOINT_SetLowerLimit2 thigh2_jt,0
TOKJOINT_SetUpperLimit2 thigh2_jt,1

TOKJOINT_EnableLimit thigh1_jt,True
TOKJOINT_EnableLimit thigh2_jt,True

TOKJOINT_EnableLimit2 thigh1_jt,True
TOKJOINT_EnableLimit2 thigh2_jt,True

TOKJOINT_Enable thigh1_jt,True
TOKJOINT_Enable thigh2_jt,True


; body to neck
body1_jt = TOKJOINT_Create(2,body_rb,neck_rb)

TOKJOINT_SetPositionAndRotationWorld body1_jt,0,14,0,0,0,0

TOKJOINT_SetType body1_jt,1

TOKJOINT_SetLowerLimit body1_jt,0
TOKJOINT_SetUpperLimit body1_jt,0.5

TOKJOINT_SetLowerLimit2 body1_jt,0
TOKJOINT_SetUpperLimit2 body1_jt,0

TOKJOINT_EnableLimit body1_jt,True

TOKJOINT_EnableLimit2 body1_jt,True

TOKJOINT_Enable body1_jt,True


; neck to head
neck_jt = TOKJOINT_Create(2,neck_rb,head_rb)

TOKJOINT_SetPositionAndRotationWorld neck_jt,0,15.5,0,0,0,0



TOKJOINT_SetType neck_jt,1

TOKJOINT_SetLowerLimit neck_jt,0
TOKJOINT_SetUpperLimit neck_jt,0.5

TOKJOINT_SetLowerLimit2 neck_jt,0
TOKJOINT_SetUpperLimit2 neck_jt,1

TOKJOINT_EnableLimit neck_jt,True

TOKJOINT_EnableLimit2 neck_jt,True

TOKJOINT_Enable neck_jt,True


; body to upperarms
body2_jt = TOKJOINT_Create(2,body_rb,upper1_rb)
body3_jt = TOKJOINT_Create(2,body_rb,upper2_rb)

TOKJOINT_SetPositionAndRotationWorld body2_jt,-3.0,13,0,0,0,0
TOKJOINT_SetPositionAndRotationWorld body3_jt,3.0,13,0,0,0,0

TOKJOINT_SetType body2_jt,1
TOKJOINT_SetType body3_jt,1

TOKJOINT_SetLowerLimit body2_jt,0
TOKJOINT_SetUpperLimit body2_jt,1.5
TOKJOINT_SetLowerLimit body3_jt,0
TOKJOINT_SetUpperLimit body3_jt,1.5

TOKJOINT_SetLowerLimit2 body2_jt,0
TOKJOINT_SetUpperLimit2 body2_jt,1
TOKJOINT_SetLowerLimit2 body3_jt,0
TOKJOINT_SetUpperLimit2 body3_jt,1

TOKJOINT_EnableLimit body2_jt,True
TOKJOINT_EnableLimit body3_jt,True

TOKJOINT_EnableLimit2 body2_jt,True
TOKJOINT_EnableLimit2 body3_jt,True

TOKJOINT_Enable body2_jt,True
TOKJOINT_Enable body3_jt,True


; upperarms to lowerarms
upper1_jt = TOKJOINT_Create(2,upper1_rb,lower1_rb)
upper2_jt = TOKJOINT_Create(2,upper2_rb,lower2_rb)

TOKJOINT_SetPositionAndRotationWorld upper1_jt,-6.0,13,0,0,0,0
TOKJOINT_SetPositionAndRotationWorld upper2_jt,6.0,13,0,0,0,0

TOKJOINT_SetType upper1_jt,1
TOKJOINT_SetType upper2_jt,1

TOKJOINT_SetLowerLimit upper1_jt,0
TOKJOINT_SetUpperLimit upper1_jt,1.5
TOKJOINT_SetLowerLimit upper2_jt,0
TOKJOINT_SetUpperLimit upper2_jt,1.5

TOKJOINT_SetLowerLimit2 upper1_jt,0
TOKJOINT_SetUpperLimit2 upper1_jt,1
TOKJOINT_SetLowerLimit2 upper2_jt,0
TOKJOINT_SetUpperLimit2 upper2_jt,1

TOKJOINT_EnableLimit upper1_jt,True
TOKJOINT_EnableLimit upper2_jt,True

TOKJOINT_EnableLimit2 upper1_jt,True
TOKJOINT_EnableLimit2 upper2_jt,True

TOKJOINT_Enable upper1_jt,True
TOKJOINT_Enable upper2_jt,True


; lowerarms to hands
lower1_jt = TOKJOINT_Create(2,lower1_rb,hand1_rb)
lower2_jt = TOKJOINT_Create(2,lower2_rb,hand2_rb)

TOKJOINT_SetPositionAndRotationWorld lower1_jt,-9.0,13,0,0,0,0
TOKJOINT_SetPositionAndRotationWorld lower2_jt,9.0,13,0,0,0,0

TOKJOINT_SetType lower1_jt,1
TOKJOINT_SetType lower2_jt,1

TOKJOINT_SetLowerLimit lower1_jt,0
TOKJOINT_SetUpperLimit lower1_jt,1
TOKJOINT_SetLowerLimit lower2_jt,0
TOKJOINT_SetUpperLimit lower2_jt,1

TOKJOINT_SetLowerLimit2 lower1_jt,0
TOKJOINT_SetUpperLimit2 lower1_jt,1
TOKJOINT_SetLowerLimit2 lower2_jt,0
TOKJOINT_SetUpperLimit2 lower2_jt,1

TOKJOINT_EnableLimit lower1_jt,True
TOKJOINT_EnableLimit lower2_jt,True

TOKJOINT_EnableLimit2 lower1_jt,True
TOKJOINT_EnableLimit2 lower2_jt,True

TOKJOINT_Enable lower1_jt,True
TOKJOINT_Enable lower2_jt,True



MoveEntity camera,0,0,-20
While Not KeyDown(1)
	If KeyDown(200)
		MoveEntity camera,0,0,1
	EndIf
	If KeyDown(208)
		MoveEntity camera,0,0,-1
	EndIf
	If KeyDown(203)
		TurnEntity camera,0,1,0
	EndIf
	If KeyDown(205)
		TurnEntity camera,0,-1,0
	EndIf
	If KeyDown(30)
		MoveEntity camera,0,1,0
	EndIf
	If KeyDown(44)
		MoveEntity camera,0,-1,0
	EndIf

	If KeyHit(28)	
		TOKRB_ApplyImpulse body_rb,0,0,1500

		If go = False
			go = True
		Else
			go = False
		EndIf
	EndIf

	If go = True
		TOKSIM_Advance .1,3
	EndIf
	
	UpdateWorld


	PositionEntity ground,TOKAB_GetX(ground_ab),TOKAB_GetY(ground_ab),TOKAB_GetZ(ground_ab)
	RotateEntity ground,TOKAB_GetPitch(ground_ab),TOKAB_GetYaw(ground_ab),TOKAB_GetRoll(ground_ab),False

	PositionEntity wall1,TOKAB_GetX(wall1_ab),TOKAB_GetY(wall1_ab),TOKAB_GetZ(wall1_ab)
	RotateEntity wall1,TOKAB_GetPitch(wall1_ab),TOKAB_GetYaw(wall1_ab),TOKAB_GetRoll(wall1_ab),False

	
	

	PositionEntity foot1,TOKRB_GetX(foot1_rb),TOKRB_GetY(foot1_rb),TOKRB_GetZ(foot1_rb)
	RotateEntity foot1,TOKRB_GetPitch(foot1_rb),TOKRB_GetYaw(foot1_rb),TOKRB_GetRoll(foot1_rb),False

	PositionEntity foot2,TOKRB_GetX(foot2_rb),TOKRB_GetY(foot2_rb),TOKRB_GetZ(foot2_rb)
	RotateEntity foot2,TOKRB_GetPitch(foot2_rb),TOKRB_GetYaw(foot2_rb),TOKRB_GetRoll(foot2_rb),False

	PositionEntity calve1,TOKRB_GetX(calve1_rb),TOKRB_GetY(calve1_rb),TOKRB_GetZ(calve1_rb)
	RotateEntity calve1,TOKRB_GetPitch(calve1_rb),TOKRB_GetYaw(calve1_rb),TOKRB_GetRoll(calve1_rb),False

	PositionEntity calve2,TOKRB_GetX(calve2_rb),TOKRB_GetY(calve2_rb),TOKRB_GetZ(calve2_rb)
	RotateEntity calve2,TOKRB_GetPitch(calve2_rb),TOKRB_GetYaw(calve2_rb),TOKRB_GetRoll(calve2_rb),False

	PositionEntity thigh1,TOKRB_GetX(thigh1_rb),TOKRB_GetY(thigh1_rb),TOKRB_GetZ(thigh1_rb)
	RotateEntity thigh1,TOKRB_GetPitch(thigh1_rb),TOKRB_GetYaw(thigh1_rb),TOKRB_GetRoll(thigh1_rb),False

	PositionEntity thigh2,TOKRB_GetX(thigh2_rb),TOKRB_GetY(thigh2_rb),TOKRB_GetZ(thigh2_rb)
	RotateEntity thigh2,TOKRB_GetPitch(thigh2_rb),TOKRB_GetYaw(thigh2_rb),TOKRB_GetRoll(thigh2_rb),False

	PositionEntity body,TOKRB_GetX(body_rb),TOKRB_GetY(body_rb),TOKRB_GetZ(body_rb)
	RotateEntity body,TOKRB_GetPitch(body_rb),TOKRB_GetYaw(body_rb),TOKRB_GetRoll(body_rb),False

	PositionEntity neck,TOKRB_GetX(neck_rb),TOKRB_GetY(neck_rb),TOKRB_GetZ(neck_rb)
	RotateEntity neck,TOKRB_GetPitch(neck_rb),TOKRB_GetYaw(neck_rb),TOKRB_GetRoll(neck_rb),False

	PositionEntity head,TOKRB_GetX(head_rb),TOKRB_GetY(head_rb),TOKRB_GetZ(head_rb)
	RotateEntity head,TOKRB_GetPitch(head_rb),TOKRB_GetYaw(head_rb),TOKRB_GetRoll(head_rb),False

	PositionEntity upper1,TOKRB_GetX(upper1_rb),TOKRB_GetY(upper1_rb),TOKRB_GetZ(upper1_rb)
	RotateEntity upper1,TOKRB_GetPitch(upper1_rb),TOKRB_GetYaw(upper1_rb),TOKRB_GetRoll(upper1_rb),False

	PositionEntity upper2,TOKRB_GetX(upper2_rb),TOKRB_GetY(upper2_rb),TOKRB_GetZ(upper2_rb)
	RotateEntity upper2,TOKRB_GetPitch(upper2_rb),TOKRB_GetYaw(upper2_rb),TOKRB_GetRoll(upper2_rb),False

	PositionEntity lower1,TOKRB_GetX(lower1_rb),TOKRB_GetY(lower1_rb),TOKRB_GetZ(lower1_rb)
	RotateEntity lower1,TOKRB_GetPitch(lower1_rb),TOKRB_GetYaw(lower1_rb),TOKRB_GetRoll(lower1_rb),False

	PositionEntity lower2,TOKRB_GetX(lower2_rb),TOKRB_GetY(lower2_rb),TOKRB_GetZ(lower2_rb)
	RotateEntity lower2,TOKRB_GetPitch(lower2_rb),TOKRB_GetYaw(lower2_rb),TOKRB_GetRoll(lower2_rb),False

	PositionEntity hand1,TOKRB_GetX(hand1_rb),TOKRB_GetY(hand1_rb),TOKRB_GetZ(hand1_rb)
	RotateEntity hand1,TOKRB_GetPitch(hand1_rb),TOKRB_GetYaw(hand1_rb),TOKRB_GetRoll(hand1_rb),False

	PositionEntity hand2,TOKRB_GetX(hand2_rb),TOKRB_GetY(hand2_rb),TOKRB_GetZ(hand2_rb)
	RotateEntity hand2,TOKRB_GetPitch(hand2_rb),TOKRB_GetYaw(hand2_rb),TOKRB_GetRoll(hand2_rb),False
	
	RenderWorld
	Flip
Wend

TOKSIM_DestroySimulator()

End



Ugly picture:



And a download for those without B3D and/or Tokamak:
ragtest1.rar (658kb)
ragtest1.zip (657kb)


Enjoy :)

Oh, if anyone can figure out why the ragdoll 'twitches' after it lands on the floor and fix it.. there'll be kisses in the e-mail.. can't seem to figure out why it does that :(


Tracer

can't fix your problem right now, tho I can hardly stand your email offer +_+ , but thanks for sharing anyway!