hello all What I have is an object of a pulley that needs to follow the car, and spin on its roll axis but follow the car. what I did is this

///////////////////////////////////////////////////////////////
action PulleyFollow()
{
you = pChassis;
while(1)
{
var temp;
temp +=1;

vec_set(my.pan,pChassis.pan);
vec_set(my.tilt,pChassis.tilt);
vec_set(my.roll,temp);
vec_set(my.x,vector(-85,-3,-17)); // set Pulley model about the entity center
vec_for_ent(my.x,you); // convert the position to world coordinates
vec_to_ent(my.roll,you);
wait(1);
}

}
////////////////////////////////////////////////
if i dont use the vec_set(my.roll,temp); the pulley will follow in the right place but no spin. I am new to coding so i am sure i am going around my elbow to find my foot. Can any one please help!

Last edited by SpearBang; 11/15/10 17:24.