Another Ragdoll problem

Blitz3D Forums/Blitz3D Programming/Another Ragdoll problem

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.

I think you need to make it clearer what you want. Are you going to make the ragdoll mesh within code or load a boned mesh?

If you're making it in code then it would be much easier to keep each constraint/limb as a separate entity.

Firstly create a temp mesh for your limb. Note that you need to offset the z axis, and make sure the depth of the mesh = 1 for this to work.

LIMB = createsphere()
positionmesh LIMB,0,0,1
scalemesh LIMB,1,1,.5

Add a new field into the contraint type so that you can store a copy of LIMB. Then in the update constraint phase simply position this limb at the head verlet. Pointentity the limb to the tail verlet. Then scaleentity on the z axis only based on the entitydistance between the two verlets.

You may want to store a thickness variable in the contraint type so that you can have a wider head etc.. Just apply this when your scaling the entity ..
e.g. scaleentity c\limb, c\thickness, c\thickness, entitydistance(... )