Sunday, July 8, 2007

Beta-1, here we come

I've finished my milestones for the first beta; all the placeable shapes are there, autofields of both varieties work, and bodies have arbitrary tags that will have some utility later. I may be doing various other work before the beta, but I've pretty much got it all under wraps.

Break out the champagne!

Friday, July 6, 2007

Autofields working with shapes for activation

I've recently finished enabling activation of fields by collision. Of course, this requires that both the field and any bodies it must effect. Fields with no shape apply to all bodies in the scene, as before. Here's an example, available in the tests directory as
from time import sleep
import soy
sce = soy.Scene()
cam = soy.bodies.Camera(sce)
cam.position = (0,0,13)
py1 = soy.bodies.Pyramid(sce)
py1.position = (-2,0,0)
py1.shape = soy.shapes.Sphere(1)
py1.velocity = (0,0.7,0)
py2 = soy.bodies.Pyramid(sce)
py2.position = (0,0,0)
py2.shape = soy.shapes.Sphere(1)
py2.velocity = (0,0.7,0)
py3 = soy.bodies.Pyramid(sce)
py3.position = (2,0,0)
py3.shape = soy.shapes.Sphere(1)
py3.velocity = (0,0.7,0)
scr = soy.Screen()
win = soy.Window(scr, size=(640,480))
pro = soy.widgets.Projector(win, size=(640,480), camera=cam)
m = soy.bodies.fields.Monopole(sce)

You should notice the pyramids being repelled by interesecting an invisible sphere.