Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import mathutils as mt
- def apply(cont):
- cube = cont.owner
- for o in cube.scene.objects:
- normal = o.rayCast(cube, o)[2]
- if not normal: continue
- g = -normal * 9.8
- o.applyForce(g)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement