Posted By: Bone
path_create doesnt work - 04/27/11 14:00
I tried to create a path with path_create and an entity that
follow the path.
var 'check' and 'node' are always 0
I write this again so you dont forget it
follow the path.
var 'check' and 'node' are always 0
I write this again so you dont forget it
Code:
var dist = 0; ENTITY* ball = ent_create("ball.mdl", vector(0,0,20),NULL); path_create(ball,4,4); var check = path_setnode(ball,1, vector(0,30,20),NULL); path_setnode(ball,2, vector(3*60,3*30,70),NULL); path_setnode(ball,3, vector(7*60,4*30,50),NULL); path_setnode(ball,4, vector(11*60,2*30,20),NULL); while(1){ var node = path_spline(ball,ball.x,dist); dist += 5*time_step; DEBUG_VAR(check, 10); DEBUG_VAR(node,22); wait(1); }