Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. ActiveObj.game.physics_type = 'RIGID_BODY'
  2. ActiveObj.game.use_collision_bounds = 1
  3.  
  4. for obj in bpy.data.objects:
  5. bpy.ops.rigidbody.object_add(type='ACTIVE')
  6.  
  7. import bge
  8.  
  9. cont = bge.logic.getCurrentController()
  10. own = cont.owner
  11. own.suspendDynamics()
  12. #OR
  13. own.restoreDynamics()
  14.  
  15. import bge
  16.  
  17. cont = bge.logic.getCurrentController()
  18. own = cont.owner
  19. own.mass = float('inf')
  20.  
  21. import bge
  22.  
  23. own = bge.logic.getCurrentController().owner
  24. if 'ori' not in own:
  25. own['ori'] = own.worldOrientation.copy()
  26. own.worldOrientation = own['ori']
  27. own.worldAngularVelocity = [0.0, 0.0, 0.0]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement