Game Development Community

Connecting PhysX objects?

by Rex Hiebert · in Torque 3D Professional · 07/15/2010 (2:24 pm) · 4 replies

In my game I am using PhysX objects. The user manipulates the objects and PhysX does its thing. Works fine. Now I have a need to attach objects to each other and move them as a group but still retaining the physX properties. For example lets say you have a table top. You also have 4 table legs. Each of these 5 objects should be able to be manipulated on their own. I want the user to be able to attach one or more of the legs as needed and still have PhysX work on the object as a whole (I don't need them to explode and break apart, just fall and tumble). I don't want to build a model for each possible case and swap them out as there are number of other objects that will fit together in arbitrary ways. So is there a way in code to attach these objects? Can joints be added and connected at runtime? Can this at least be done for things that would have known connection points (like the table and table legs)? Currently using T3D 1.0.1.

#1
07/23/2010 (7:14 am)
No one has tried this? Are there changes to 1.1 that make it a waste of time to try and start on this under 1.0.1? I noticed that the basic PhysX objects are very different under B1.
#2
07/23/2010 (8:20 am)
I have not bothered with trying PhysX objects in 1.1 yet as I wait for final releases before I use that stuff.

& the idea you're researching is quite specific to your game/app. I would not hold your breath waiting for anyone to help you on this but I do think this would be a nice addition if someone were to add such functionality.
#3
08/11/2010 (1:20 pm)
Now that there is a lot of activity around T3D1.1B2 PhysX, does anyone know if something like this can be done?
#4
08/11/2010 (6:19 pm)
@Rex

There isn't a joint API exposed to TorqueScript just yet.

The main issue is that Torque is still a client/server system and we're 'faking' single player by mirroring the physics scene on the server to the client. With joints we would have to mirror that state as well.

So we have been waiting to resolve the single player issue before looking into joints.

Its in the queue of tasks to do in a snapshot release after 1.1.

That said... someone with a little experience and motivation could hack in a system within a day or two.