Re: brain teaser
Try this:
When you first load the settings and stuff(eg player pos, sin/cos tables
ect...) Set up the min/max view angle...then as they move just add the
correct value to min view angle(and then add 135(180-45) and you get your
max view angle....this ~SHOULD~ keep everything lined up correctly...
eg..
plarer angle = x
player minview = x + viewangle min
player mxview = player minview + 135
~action: player moves his/her view
plarer angle = x
player minview = x + viewangle min + 5
player mxview = player minview + 135
this ~looks~ right
you tell me
The all knowing Grape(just thinks he is)
PS.. let me know if this works
>From: Col22 <col22 at SUNG79.FREESERVE.CO.UK>
>Reply-To: Euphoria Programming for MS-DOS <EUPHORIA at LISTSERV.MUOHIO.EDU>
>To: EUPHORIA at LISTSERV.MUOHIO.EDU
>Subject: brain teaser
>Date: Mon, 10 May 1999 22:54:52 +0100
>
>Hi all, Col22 here with
>a little programming brain teaser for you.
>
>I have been scribbling a little 3d engine recently, and without sending
>you to sleep with the details I had this little problem in the middle.
>
>I have a player facing angle called playera.
>I have a x viewing angle called viewang
>I have various angles to check "ang",
>if they are in the feild of view, viewang.
>The angles playera and viewang are in degrees.
>veiwang can be from 45 to 180
>playera can be from 1 to 360
>
>There's the background, heres the puzzle.
>Fill in the missing condition to make the code find if
>the angle "ang" is within the given range minang to maxang.
>
>
>minang = playera - veiwang / 2
>maxang = playera + veiwang / 2
>if xxxxx missing condition xxxxx then
> blah
> blah
>end if
>
>.....................................................
>
>I have done this a few ways but am not happy with them.
>I feel there is a concise and efficient way of doing it
>but it escapes me for the moment.
>Whatever you come up with as a solution I would be happy
>to hear from you. Thanks, Col22
>
_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com
|
Not Categorized, Please Help
|
|