Re: [nbos] [A3] Rotating.
NBOS Support
Mon Feb 6th, 2012
At 12:24 PM 2/5/2012, Robert Graham wrote:
>Is there an deasy way to rotate the entire contents of a sector?

This plugin rotates the sector around the Y axis by the selected number of
degrees. You can modify it to work around another axis by changing which
values (x,y,z) you are altering.

#plugin Rotate Sector
#author NBOS
#desc Rotates sector selected degrees

a = 5 * (3.14159 / 180) 'angle in degrees converted to radians

sector = GetCurrentSector()
j = sector.SystemCount
For i = 1 to j
o = sector.GetSystem( i-1)

o.x = (Cos( a) * o.x) - (Sin( a) * o.z)
o.z = (Sin( a) * o.x) + (Cos( a) * o.z)
o.Modified = true

If i mod 1000 = 0 Then
sector.RenderMessageBig = "Updating " & i & " of " & j
End If

sector.RenderMessageBig = ""

Nbossoftware mailing list

Copyright © 2003-2007, NBOS Software. All rights reserved. 'Fractal Mapper', 'ScreenMonkey', 'Character Sketcher', 'Inspiration Pad', 'Fractal World Explorer', 'Goblin API', 'AstroSynthesis' are trademarks of NBOS Software. 'Dwarven Beserker' art by V. Shane.
Member contributed resources