|
![](/i/fill.gif) |
G'day,
>I would like to do very simple animations by keeping the object
>fixed at the origin and translating/rotating the camera along a
>defined curve. For example have the camera move in a circle in
>the X-Z plane. I must be doing something very silly because strange
>things start to happen after a 90degree rotation.
Yes, this sends me back to highschool! I tried to draw (and rotate) a 3d
object on an Amiga!
This is what happens. I can't tell you why (ask a math student!)
from 0 - 90 everything seems fine! Then, from 90 to 180, cos becomes
negative.
So when you are between 90 - 180, make deg = 90 - (angle - 90)
Same thing from 180 - 270 and 270 - 360
The way I worked around it was by changing putting a couple of "if"
statements. Like above, when ang >90 and <= 180 then deg = 90 - (angle -
90) etc.
Make sense?
Chris Payne
Melbourne, Australia
www.teksupport.net.au/~chris
Post a reply to this message
|
![](/i/fill.gif) |