Re: Help with "facing" routine

new topic     » goto parent     » topic index » view thread      » older message » newer message

Robert B Pilkington wrote:
> >i see a few things that are problems so far...
> >since you mention 'the first one being up' i'll assume
> >you are working in 3d??? no? if you are then 24 facings
>
> Don't take this the wrong way:
> Wrong!
> :)
>
> The game (I assume it's a game) is in 2d, with "up" being the direction
>top of monitor
thankee kind sir :) up was throwing me...i kept thinking 'forwards'
...heh

> >the above -wont- work for you. it's simply an outline
> >of what needs to be done. arctan only handles 0 to 180
> >(actually -pi/2 to pi/2 which is -90 to +90) so it
> >will only give you 12 of the 24 facings...
>
> Actually, if it works for 2d, it will work for him. If it works, it'll
> also work for me.... :)
don't take this the wrong way:
not!
:)
that function will not do as he asks...namely giving *24* directions.
the other half of the potential facings is *missing*, giving only 12.
you would have to flip the sign of the x or y axis to get the other
half.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu