|
![](/i/fill.gif) |
Paul Jones wrote:
>
> Does this assume that your object is not located somewhere else other
> than the origin? (<0,0,0>)
On the contrary, it assumes that the object is at the origin.
> What if I have a gun turret that is located at <5,0,5> (ie: it
> rotates around the line defined by <5,y,5>), would this macro take
> that in to account? or would another parameter _location_ be required?
Actually, it would be easier to model it at the origin, turn it using
the macro, and then translate it to where you want it.
But if you've already modeled it to turn around some other point, then
use some other transforms before and after:
object { MyGun
translate -GunLocation
PointAlong(z,<-1,1,14>,y)
translate GunLocation
}
This moves the object to the origin, rotates it, and then moves it back.
This code assumes the gun is originally modelled pointing in the +z
direction.
BTW, the macro I gave earlier turns the object, and raises it or lowers
it as well (ie, give both yaw and pitch). If you want just yaw or just
pitch, let me know and I'll explain how to call the macro for that.
Regards,
John
--
ICQ: 46085459
Post a reply to this message
|
![](/i/fill.gif) |