DynamicObject module

class DynamicObject.DynamicObject(app, name='undefined', model='defaultMeshes/cube.bam', ground=False, x=0, y=0, z=0, rx=0, ry=0, rz=0, sx=1, sy=1, sz=1, mass=0, animations={}, emission=False, overlapping=False)

Bases: src.GameObjects.GameObject.GameObject

animations

The animation of the object

app

The main application object

createShape(model)

createShape Creates the collision Shape of the object. Gets called in the __init__ function

Parameters

model (str) – The model it should display. A .bam file, defaults to “defaultMeshes/cube.bam”

Returns

Collision shape

Return type

BulletCollisionShape

emission

If the object has lights that should be moved according to the object movement, defaults to False

ignoreCollisionTriggerNames

Name patterns which should be ignored at the collision detection

lights

The lights attached to the object

model

The model path

name

The name of the object

node

The main node which displays the object. You can get the physical node by self.node.node()

onCollisionEnter(otherGameObject)

onCollisionEnter On collision of an other object entered

Parameters

otherGameObject (panda3d.core.NodePath) – the other GameObject

onCollisionExit(otherGameObject)

onCollisionExit On collision of an other object stopped

Parameters

otherGameObject (panda3d.core.NodePath) – the other GameObject

onCollisionStay(otherGameObject)

onCollisionStay On collision of an other object still happening

Parameters

otherGameObject (panda3d.core.NodePath) – the other GameObject

overlapping

Should the object be overlapping with other objects? Cannot be changed while running

touching

The objects that are touching the object. (BulletNodes)

update(task)

update Update function for the dynamic object. Please execute super().__init__(task) on it.