Posted By: boyax
model as a view... why it can't be viewed? - 07/30/09 11:20
My problem is initializing the arrow model in which i can't see it...
I'm trying to put an arrow model that would point to the obstacle in my level. Hence, as i've tried to have a small test it will display.
sample output:
but, when i ported it to my game project, I can't see the arrow model? it should always be on mid-top on the screen.
I've already make sure the vector & the layer set are visible to the camera at start.
Here's some code:
Any idea? I'm not sure if missed something. Thanks
I'm trying to put an arrow model that would point to the obstacle in my level. Hence, as i've tried to have a small test it will display.
sample output:
but, when i ported it to my game project, I can't see the arrow model? it should always be on mid-top on the screen.
I've already make sure the vector & the layer set are visible to the camera at start.
Here's some code:
Code:
function arrow_init() { while(player == NULL){ wait(1); } ent_arrow = ent_createlayer("arrow.mdl", 0, 2); //pose and orientate it if(ent_arrow != NULL) { vec_set(ent_arrow.x, vector(-20000,12224,16640)); if(NULL != vec_to_screen(ent_arrow, camera)) //just to check if it's visible { ent_arrow->tilt = 180; //see rotation code; init rotation } } }
Any idea? I'm not sure if missed something. Thanks