|
![](/i/fill.gif) |
Ger <No.### [at] Thank You> wrote:
> The wall is created at the origin, then rotated and then translated.
> Everything works okay except for the rotation angle.
I see two problems. Firstly, I think you should be using arc-tan, not
arc-sin (tan(a) = opposite/adjacent). Secondly, as you look along an axis,
negative rotation is clockwise, so I would use rotate -Angle*y.
If your wall is aligned on the z-axis, you will get a division by zero
error, which will need to be trapped. You will also need to modify this
technique if position2 is in the 2nd, 3rd or 4th quadrants relative to
Hope that helps
B
Post a reply to this message
|
![](/i/fill.gif) |