it's hard to say without seeing this but...
i'll do this this way:
trace from vertex down... i mean temp.x and y at vertex position and z f.e. -50;
then if result <=0 (on the ground) then rotate the bone.
something like this:
Code:
function checking_ground
{
while(1)
{
vec_for_vertex(checking_pos, my, 189);
vec_set(temp, checking_pos.x);
temp.z = -50;
c_trace (checking_pos.x,temp,IGNORE_ME|IGNORE_PASSABLE|IGNORE_MODELS|IGNORE_SPRITES|SCAN_TEXTURE);
if(result <=0){rotate_bone();}
wait(1);
}
}
function rotate_bone
{
anga.tilt += 1*time; anga.roll -= 1*time;
ent_bonerotate(my,"bone2",vector(0,anga.tilt,anga.roll));
}
becouse bone will be always at the same model position as center of this bone until you will use ent_bonemove function.