car racing game help... better explained


ive been making car racing type game, , ive managed designing levels, made character, added if (key.isdown(key. -x-)
statmentsd move down , , ive added rotation left , right…
it works perfect ( no syntax errors)
but when using , down keys uses default north , south.. want know how going forward , way car facing….. need make car move ( up/down/rightrotate/left rotate) way looking @ moment... how set front , is... plz

this better explained copy of previous post

any appreciated...

andy

my unproven , wrong suggestion check rotation of car determine key "if" statements. example, lets car facing in movieclip default. mean if car facing straight angle 0 degrees, facing right 90 degrees, facing down 180 degrees, , facing left 270 degrees. car angled upwards 315 degrees 45 degrees. after 45 degrees car facing right, , below 315 degrees car facing left.

knowing can check angle of car , have arrows move car in direction based on information. if car between 315-45 degrees arrow moves car up, because car facing in direction. if between 45-135 degrees arrow moves car right car facing right.

hope logic makes sense. have actionscript using _rotation property.



More discussions in Adobe Animate CC - General


adobe

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums