/
Interacting with Physx
Interacting with Physx
This example shows how you can use a simulation event to interact with Physx rigid bodies.
import Atoms import AtomsCore import AtomsMath import AtomsMaya import os class PhysxSimEvent(Atoms.SimulationEvent): eventName = 'PhysxSimEvent' def __init__(self): Atoms.SimulationEvent.__init__(self) self.setName(self.eventName) def load(self): pass def unload(self): pass def initSimulation(self): pass def initFrame(self): pass def computeFrame(self): physx = AtomsMaya.getPhysics("tcAtomsSolver") for id in physx.rigidBodyIds(): print id rb = physx.rigidBody(id) rb.addImpulse(AtomsMath.V3f(0,10,0)) def endFrame(self): pass def endSimulation(self): pass def resetSimulation(self): pass
, multiple selections available,
Related content
Physx integration
Physx integration
More like this
Physics
Physics
More like this
Python
More like this
Agents interacting with particles (ragdolls)
Agents interacting with particles (ragdolls)
More like this
Creating a standalone simulation
Creating a standalone simulation
More like this
Blueprint Behaviour
Blueprint Behaviour
More like this
Copyright © 2017, Toolchefs LTD.