|
![](/i/fill.gif) |
"Nekar Xenos" <nek### [at] gmail com> wrote:
> On Thu, 15 Aug 2013 18:16:51 +0200, Anthony D. Baye
> <Sha### [at] spamnomore hotmail com> wrote:
>
> > "Nekar Xenos" <nek### [at] gmail com> wrote:
> >> I am trying to duplicate the camera angle in a scene with a box mapped
> >> with the image, but when I use certain camera positions and look
> >> combinations, it rotates the image along the z axis. It seems to happen
> >> when the Camera position and look position don't have the same y value.
> >>
> >> How can i fix this?
> >>
> >> here is a stripped down version. If the "doesn't work' part is commented
> >> out it works fine.
> >>
> >> I must admit, I don't always know when to use Reorient_Trans() vs
> >> vrotate() vs VAngleD() and even less how to use them. It gets confusing.
> >
> > Reorient_Trans() rotates an object so that a given axis is aligned with
> > another
> > axis by rotating the object around an axis perpendicular to both.
> >
> > e.g. reorienting the object to align its x axis with it's z axis would
> > rotate it
> > around y. This is, of course, an extremely trivial example, but you
> > could also
> > use it to align an axis with a given vector (not sure if it needs to be a
> > unit-vector or not)
>
> So this is the correct one to use.
>
> >
> > vrotate() simply rotates an object around a vector.
> Thanks Anthony. The docs don't specify that it is an abject that gets
> rotated.
>
well... What it actually does, is rotate a point A around the origin by a given
amount B. -- Sorry, I misread, and was thinking of vaxis_rotate(...).
so you could use it like this:
object {
...
translate vrotate(A, B)
}
vaxis_rotate(A,B,F) does what I said. Where A is, again, a point in space, B is
a vector around which A is rotated by an amount F.
you would use it in the same way as vrotate.
Regards,
A.D.B.
regards
Post a reply to this message
|
![](/i/fill.gif) |