my.oriented

Posted By: ChildeHarold

my.oriented - 10/15/07 19:26

I read my oriented is obsolte - and it dosn't work any more.
But it must be replaced by something - by what?
Posted By: Scorpion

Re: my.oriented - 10/15/07 20:24

by setting pan or tilt != 0

if you want to have it 0 set it to 0.001...
Posted By: ChildeHarold

Re: my.oriented - 10/15/07 20:29

thanks Scorpion, one follow up question though;

that means I have to type in the real pan or tilt value? Although it's done in WED?
Posted By: demiGod

Re: my.oriented - 10/16/07 13:31

from the manual:

Quote:


For orienting the entity in a certain direction or towards a certain point in space, use the vec_to_angle function.





so,

Code:

function turn_towards_target()
{
// get the direction from the entity MY to the entity YOU
vec_set(temp,your.x);
vec_sub(temp,my.x);
vec_to_angle(my.pan,temp); // now MY looks at YOU
}


© 2024 lite-C Forums