fabmax / physx-js-webidl

Javascript WASM bindings for Nvidia PhysX
MIT License
119 stars 28 forks source link

setKinematicTarget #11

Closed lucas-jones closed 2 years ago

lucas-jones commented 2 years ago

I'm having issue using the function setKinematicTarget a PxRigidDynamic. When I call the function I get

RuntimeError: memory access out of bounds

Code:

body.setRigidBodyFlag(PhysX.PxRigidBodyFlagEnum.KINEMATIC, true);
body.setKinematicTarget(new PhysX.PxTransform(new PhysX.PxVec3(0, 0, 0), new PhysX.PxQuat(0, 0, 0, 1)));

Has anyone had any success in creating a Kinematic body?

lucas-jones commented 2 years ago

Okay ignore me 😅 setKinematicTarget can only be called once the body has been added to scene!