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:

Shape2D resources, joints, and the self.physics / self.physics_2d spatial-query wrappers. All three node families share the

class:

PhysicsObject2D / :class:PhysicsObject3D base, which is the name for “a node with a body in the physics world”. Bodies resolve their world through a

class:

PhysicsRoot / :class:PhysicsRoot2D ancestor (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

Package Contents

Data

API

simvx.core.physics.__all__

[‘BodyMode’, ‘CombineMode’, ‘PhysicsMaterial’, ‘Contact’, ‘Contact2D’, ‘Shape’, ‘SphereShape3D’, ‘Bo…