Physics frame rate slow down

Software: Away3D 4.x

therealloft, Member
Posted: 26 February 2015 03:03 AM   Total Posts: 65

Hello fellow devs, I’m having a little issue with AWPBvhTriangleMeshShape. when I add a AWPRigidBody with a Bvh shape it causes a few frames to drop while being added, is there a way to pre-calculate say on a background worker like I do my mesh geometry creation, or can I move all the physics stuff to its own worker and just send update to my kinematic controller via a MessageChannel?

my script currently runs on two threads. the main thread handles input, away3d and physics, and the background thread to create geometry and sends to back to the main thread once calculated. using this method I was able to save most of the frame drop caused geometry creation,

So basically could I run awayphysics on its own thread? or calculate rigid bodies on a seperate thread?

var shape:AWPBvhTriangleMeshShape = new AWPBvhTriangleMeshShape(geo);
var 
rigidBody:AWPRigidBody = new AWPRigidBody(shapemesh0);
rigidBody.transform mesh.transform
   

therealloft, Member
Posted: 26 February 2015 08:29 AM   Total Posts: 65   [ # 1 ]

Status resolved
After a little messing around a one line add to AWPRigidBody class i am able to get this work on background thread

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X