Ok.. i´m working on a template Project for my workshop. But got a little Problem...
I created a Level. inside is a straigth way, with a little half-pipe at the end. The way and the pipe are made of 13 plates. The pipe is built of 6 models. each has a higher roll-value ( to rotate it to a half-pipe ).
Now i created a ball on the way. i want the ball to fly straight on, ask for the pipe-plates roll value.. and set the balls own tilt to the you.roll
Problem:
i´m tracing below the hero:
action player_action()
{
player = my;
wait(1);
c_setminmax(my);
while(1)
{
c_trace(my.x,vector(my.x,my.y,my.z-9999),IGNORE_ME);
if(you != NULL){my.tilt = you.roll;}
if(key_a == 1){c_move(my,vector(1*time_step,0,0),nullvector,GLIDE);}
vec_set(camera.x, vector(my.x,my.y-400,my.z));
wait(1);
}
}
ok.. works fine. The plate gives his roll-value to the ball. BUT.
Now the tilt of the ball is 15 ( the roll-value of the 1st pipe-plate ).
But the c_trace is scanning straight down... How to say the tracing, to trace into the new direction?