|
![](/i/fill.gif) |
Tim Attwood wrote:
>> The walls are created just fine and placed at the correct place
>> (Position1)
>> but the rotation (rotate Angle) is wrong.
>
> rotate moves an object around the origin,
>
> from your code
> OutSideWall(< 200,0,1200>, true,< 200,0,800>, true)
> I deduce that you have a wall starting at <200,0,1200>
> (Position1) and going to <200,0,800> (Position2)
>
> So if you wish to rotate the wall around Position1 you'd
> first translate the wall to the origin, then rotate it, then
> put it back at Position1.
>
> object {
> ThisWall
> translate -Position1
> rotate y * Angle
> translate Position1
> }
The wall is created at the origin, then rotated and then translated.
Everything works okay except for the rotation angle.
--
Ger
Post a reply to this message
|
![](/i/fill.gif) |