|
![](/i/fill.gif) |
"Chris B" <c_b### [at] btconnect com> wrote in
news:3fdf72ea$1@news.povray.org:
> Looking at what you want to do you will need to work with
> 90-targetAngle, which you actually get if you take the arctan of x /
> z. You will then need to compensate for the direction that your object
> is pointing in when you defined it, so if it points at -z to start
> with you don't need to compensate at all and you can use rotation =
> atan2d(x1,z1); If your object points out along +z you will need to add
> or subtract 180. e.g. rotation = 180 + atan2d(x1,z1);
> If it's +x then add 90, for -x subtract 90 (I think!!).
Swapping the x and z values in the atan2d formula did the trick. Thank you
very much!
Rich
Post a reply to this message
|
![](/i/fill.gif) |