entity rotation

Posted By: frescosteve

entity rotation - 05/11/08 12:34

Is there a way to rotate an entity by its relative position. I am rotating my entities on one axis but then when you go to rotate it on a different axis you can get unwanted results.

I tried using c_rotate and tried editing the actual angles and both give the wrong results.

Never mind... I read the manual and found USE_AXIS.
Posted By: KMS

Re: entity rotation - 05/11/08 13:58

I have the same problem as I understood the post right.I think,we have to use ang_add,but I don't know to script it.
Posted By: Rasterbar

Re: entity rotation - 05/12/08 21:07

This should work.
Code:
vec_set(you.pan, vector(10,0,0)); // the offsets for the you entity pan tilt roll
ang_add(you.pan, my.pan); // add the pan tilt roll from the my entity

Posted By: BERG

Re: entity rotation - 05/12/08 22:37

the easiest way to do it is c_rotate(my,angle vector,use_axisr);
Posted By: BERG

Re: entity rotation - 05/12/08 22:39

angle vector is the pan,tilt roll vector that it will move every frame. use_axisr is for what i call "airplane" flight
Posted By: KMS

Re: entity rotation - 05/13/08 02:04

Thank's for your tips!
© 2024 lite-C Forums