hi,
ive searched abit for this and havent been successful in finding results...
im trying to figure out the code for making a MC rotate and face another MC, this is for racing game AI. im going to use the waypoint system.
well firstly what pops up in my head of how to do this is as follows
i seriously have no hope from that, but im guessing that you have to firstly find the x and y of both MC's then ya gotta find the angle between them with the code i have shown. and then somehow make the mc rotate at a certain speed until its facing the other MC.Code:acc_x = Math.cos((Math.PI*this._rotation)/180); acc_y = Math.sin((Math.PI*this._rotation)/180);
could someone please help me, just explain how i would go about it, perhaps not hand it to me on a silver platter with ALL the code, more like explain to me how it works with lil samples on the hard bits, cos beleive it or not im actually getting good at AS lol...
i hope im not asking alot.
thanx in advance![]()




Reply With Quote