Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. import mathutils as mt
  2.  
  3. def apply(cont):
  4. cube = cont.owner
  5. for o in cube.scene.objects:
  6. normal = o.rayCast(cube, o)[2]
  7. if not normal: continue
  8. g = -normal * 9.8
  9. o.applyForce(g)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement