PhysX objects duplication?
by Zealander · in Torque 3D Beginner · 11/15/2009 (4:36 am) · 5 replies
Hi all.
I used to PhysX and to PhysX visual debugger.
So i wanted to try to see the scene from PhysX demo project in the debugger.
You could do the same very quickly, just add 1 line of code to file Torque 3D 2009 Tools Demo 1.0.1\Demos\PhysX\game\scripts\client\init.cs
function initClient(){
...
// enable Physx debugger
physXRemoteDebuggerConnect();
exec("art/gui/customProfiles.cs"); // override the base profiles if necessary
...
and of course you need to start remote debugger from PhysX SDK(better download new version 1.1.8) before.
I do not know why, but almost every object on the scene is duplicated.
Then i created new level with ony barrel on the scene.
I got 4 actors in debugger - 2 barrels,character controller and ground plain(NxScene->Main scene objects)
When i start to shoot on the barrel
1 barrel remains still on the position , another one was rolling away.
In Torque3D demo all looks right, only 1 barrel,but
it is not good for physX performance, twice slowly, and i do not see real physics scene.
It is very important for me, because i can see all forces, mass centers, real object bounds ans so on, even ray casts as they physically are. I thought player is a capsule but it is a box, there are no projectiles on physx scene at all, tree is just a capsule or some shapes and so on.
So my question is - is it a bug or it have to work such way?
I used to PhysX and to PhysX visual debugger.
So i wanted to try to see the scene from PhysX demo project in the debugger.
You could do the same very quickly, just add 1 line of code to file Torque 3D 2009 Tools Demo 1.0.1\Demos\PhysX\game\scripts\client\init.cs
function initClient(){
...
// enable Physx debugger
physXRemoteDebuggerConnect();
exec("art/gui/customProfiles.cs"); // override the base profiles if necessary
...
and of course you need to start remote debugger from PhysX SDK(better download new version 1.1.8) before.
I do not know why, but almost every object on the scene is duplicated.
Then i created new level with ony barrel on the scene.
I got 4 actors in debugger - 2 barrels,character controller and ground plain(NxScene->Main scene objects)
When i start to shoot on the barrel
1 barrel remains still on the position , another one was rolling away.
In Torque3D demo all looks right, only 1 barrel,but
it is not good for physX performance, twice slowly, and i do not see real physics scene.
It is very important for me, because i can see all forces, mass centers, real object bounds ans so on, even ray casts as they physically are. I thought player is a capsule but it is a box, there are no projectiles on physx scene at all, tree is just a capsule or some shapes and so on.
So my question is - is it a bug or it have to work such way?
#2
11/16/2009 (1:56 pm)
I got it now, thank you Tom.
#3
BTW, very cool trick with the debugger. That will help a lot! It was at least able to show me why I could no longer select items (server and client objects out of synch).
Thanks!
11/17/2009 (10:33 am)
So how do you keep them in synch? I can move the object and once it finishes its simulation the two are sometimes out of synch which causes problems. When making calls to getWorld, should I be using Server or Client?BTW, very cool trick with the debugger. That will help a lot! It was at least able to show me why I could no longer select items (server and client objects out of synch).
Thanks!
#4
11/17/2009 (4:34 pm)
@Rex - PhysX isn't fully setup for networking just yet. Its on our task list for 1.1 still.
#5
Maybe you can point me in the right direction on where to modify the code. I'm doing something like a puzzle game where you are moving and stacking objects. I need to be able to select and deal with them but when they get out of sync it causes problems. I would also like to know when a block stops moving so that I can record it's position and do some other checking but there doesn't appear to be an event fired for that.
Any ideas?
11/18/2009 (4:17 pm)
ugh. That's a problem. And no one is saying how long it will be until we see the next release.Maybe you can point me in the right direction on where to modify the code. I'm doing something like a puzzle game where you are moving and stacking objects. I need to be able to select and deal with them but when they get out of sync it causes problems. I would also like to know when a block stops moving so that I can record it's position and do some other checking but there doesn't appear to be an event fired for that.
Any ideas?
Associate Tom Spilman
Sickhead Games