Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Angles

Author
Message
haliop
User Banned
Posted: 18th Jan 2009 16:55
hi again
so for shirt..
i'm building a top down 2D Shooter as some of you alreadt know.
i'm using


for calculating the Angle between 1st Sprite which is Player and the MOUSE X Y..
now i tried to add 180 decrese 180 ..
but The Y angle is up side down..
so when my mouse is above the sprite the sprite Points down
and Points up when my mouse is below the sprite...

how do i fix it?

ty for your time
nadav.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Jan 2009 17:35
Take this part: dbMouseY()-dbSpriteY(1)
and reverse the values: dbSpriteY(1)-dbMouseY()

haliop
User Banned
Posted: 18th Jan 2009 18:32
already done that .. still same problem....
maybe something else?
like an IF method?

i can't seem to understand how this works.. i try but .. nothing my brain is empty..
haliop
User Banned
Posted: 18th Jan 2009 18:56
ok it works.. ty IanM

ty.

Login to post a reply

Server time is: 2024-09-30 15:35:08
Your offset time is: 2024-09-30 15:35:08