It's really easy.
deg = 360.0 / sides # how many rays you want
y = 0.0 #replace with the y position of the source pos
r = 1.0 #radius
for j in xrange(sides):
angle = deg * j / 180.0 * M_PI
x = math.cos( angle ) * r
z = math.sin( angle ) * r
pnt = OpenMaya.MPoint( x, y, z ) #add this to an MPointArray
On Thursday, October 16, 2014 6:30:23 PM UTC+2, [email protected] wrote:
>
> cool yeah, i have a little script that can fire a ray in a specific
> direction. Have no idea how i can fire a ray in every direction in a
> circular motion though ha,
>
> will investigate, thanks,
> Sam
>
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/82acc920-3229-4413-9b5e-da9e7b2194d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.