The PhysicsProperty class describes all properties necessary to physically simulate an object using the pymunk engine.
The properties are defined in the method setup_physics(). You can override this method if you want your class to have different physical properties.
For an object to be physically simulated, the method start_physics() must first be called.
Friction is the force resisting the relative motion of solid surfaces, fluid layers, and material elements sliding against each other. Friction has a value > 0
The mass of an object. Default: 1
If True, the Object has no moment and can’t be rotated by an impulse
Defines if the object can move
Defines if the object affected by gravity
line, circle or rect
Reloads physics model from pygame data Returns:
Updates the physics model in every frame
Starts the physcis-simulation for this object. If you want to use Physics-Sumulation with your object, you have to use this method.
WARNING: This method should be called AFTER all changes of attributes but BEFORE you add an impulse to the object
>>> # These attributes are changed BEFORE start_physics() >>> self.physics.size = 0.7, 0.7 >>> self.physics.shape_type = "circle" >>> self.physics.stable = False >>> # The physics simulation is started >>> self.start_physics() >>> # The impulse is applied to the object AFTER starting the physics simulation >>> self.physics.velocity_x = 1500 >>> self.physics.velocity_y = - self.board.arrow.direction * 50