About Store Forum Documentation Contact



Post Reply 
joint blocking
Author Message
dna77 Offline
Member

Post: #1
joint blocking
Hi, is there a way to access a joint in ragdoll to block it?

With regards
11-04-2009 07:54 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: joint blocking
you can't access joints but you can try creating new ones
11-04-2009 08:00 PM
Find all posts by this user Quote this message in a reply
dna77 Offline
Member

Post: #3
RE: joint blocking
Thaks.

I've done it with knees and elbows using:

Lbone = ragdoll.findActor("LegLD");
Ubone = ragdoll.findActor("LegLU");

joint.createDist(*ragdoll.findActor("LegLD"), ragdoll.findActor("LegLU") , Lbone->pos() , Ubone->pos() , 0.01 , 0.01);

and it works fine but how to control a shoulder joint? There is:

createBodySpherical(Actor &bone,Actor &parent,Vec &anchor,Vec &axis,Flt swing ,Flt twist )

but why anchor is in a world space pos, and how to set axis while ragdoll is in constant movement?

I dont understand these parameters.
11-07-2009 10:00 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: joint blocking
you create a joint only once, you don't need to create it every frame

you can create the joint first time when ragdoll is in uniform pose

but world/local space isn't problem, you just have to multiply or divide the vector by actor matrix/orientation
11-07-2009 10:06 PM
Find all posts by this user Quote this message in a reply
dna77 Offline
Member

Post: #5
RE: joint blocking
I can't figure out how these parent/world spaces work.

When i call
cskel.findBone("Head")->matrix() .draw();

it draws matrix with its pos not at Head position.
How to draw a matrix exactly at Head pos?
(This post was last modified: 11-11-2009 01:17 PM by dna77.)
11-11-2009 01:16 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: joint blocking
please check the comment on CSkelBone::matrix
you should do SkelBone * CSkelBone::matrix
11-11-2009 02:53 PM
Find all posts by this user Quote this message in a reply
Post Reply