simvx.core.physics¶
SimVX Physics: rigid bodies, areas, joints and spatial queries.
The public physics surface is one PhysicsBody2D/3D node with
a runtime-mutable :class:BodyMode (STATIC | KINEMATIC | DYNAMIC),
CharacterBody2D/3D (a KINEMATIC body plus a collide-and-slide movement
helper, not a separate kind of thing), Area2D/3D + GravityArea2D/3D
triggers, CollisionShape2D/3D carriers fed by :class:Shape /
- class:
Shape2Dresources, joints, and theself.physics/self.physics_2dspatial-query wrappers. All three node families share the- class:
PhysicsObject2D/ :class:PhysicsObject3Dbase, which is the name for “a node with a body in the physics world”. Bodies resolve their world through a- class:
PhysicsRoot/ :class:PhysicsRoot2Dancestor (or an implicit default world).
Usage: from simvx.core import BodyMode, CollisionShape3D, PhysicsBody3D, SphereShape3D
class Ball(PhysicsBody3D):
def on_ready(self):
self.add_child(CollisionShape3D(shape=SphereShape3D(0.5)))
ball = Ball(mode=BodyMode.DYNAMIC) # or the mode name: Ball(mode="dynamic")
mode is inherited from :class:PhysicsBody3D: set it per instance or in
the scene file. Re-declaring it as a fresh Property on a subclass replaces
the engine’s descriptor and disables both the string spelling and the hook that
pushes a runtime mode flip into the physics world.
Subpackages¶
Submodules¶
simvx.core.physics.pymunk_backendsimvx.core.physics.materialsimvx.core.physics.shapes2dsimvx.core.physics.nodessimvx.core.physics.capabilitysimvx.core.physics.shapessimvx.core.physics.world2dsimvx.core.physics.slidesimvx.core.physics.rootsimvx.core.physics.nodes2dsimvx.core.physics.backendssimvx.core.physics.query2dsimvx.core.physics.worldsimvx.core.physics.query
Package Contents¶
Data¶
API¶
- simvx.core.physics.__all__¶
[‘BodyMode’, ‘CombineMode’, ‘PhysicsMaterial’, ‘Contact’, ‘Contact2D’, ‘Shape’, ‘SphereShape3D’, ‘Bo…