Game Development Community

Western Style swinging door

by Aaron Heal · in Torque 3D Professional · 06/02/2010 (9:45 am) · 17 replies

I was just wondering how one would go about doing one. Would I need to get PhysX working (Next to flippin impossible) or can it be done using a rigid shape or something. If anyone who has done one can give me some pointers that would be great.

#1
06/03/2010 (5:31 am)
Well if you just want someone to point you in a non-PhysX direction...

I'd look at animations and triggers.

IE walk into the trigger it opens the door, walk out it plays another animation.
#2
06/03/2010 (8:10 am)
Well I have now got PhysX to work in my project so I am open to PhysX Solutions the main readson I initially wanted to do it in PhysX is because I wanted it to be if the player walks into it pivots as you would expect but to also have it swing back is it would in real life if it is possible
#3
06/03/2010 (8:37 am)
How hard is it to distribute a working PhysX solution to end users?
#4
06/03/2010 (8:44 am)
huh?
#5
06/27/2010 (8:14 pm)
I am still trying to think of how to do this has anyone got any help for me seemingly no one has tried this I would really like to get this sorted.
#6
06/27/2010 (9:21 pm)
This is very possible with PhysX joints and a little creativity using them since the spring functions do not work in the default PhysX example.

Do you have 3dsMax 2008 or 2009 ? These are the ONLY 2 versions of Max that currently support proper T3D exporting with the use of the "compiled for T3D" exporters.

#7
06/27/2010 (9:33 pm)
I am with #1. I have a curtain in mine that opens when you step into the trigger, then closes behind you when you step into the room and hit the next trigger. You could trigger the swinging door just to swing open and then trigger it to swing closed when you are clear of it. You wouldn't have the realistic effect of the door swinging back into you if you walk too slowly but at least you would have a swinging door.

I don't have a clue of how to get it to swing back into you and then open again if you aren't clear of the door.
#8
06/28/2010 (6:46 am)
@eb I use 2009 and I usually export as opencollada but I have exported physics meshes before

@ray thats not quite what I am after though essentially what I am after is the door opens as the player collides with and once there is no more collision going on the door swings back and forth until the energy dissapate like a real swinging door would
#9
06/28/2010 (11:44 am)
If you have worked with animating objects at all, this should be easy for you (that is if you don't want it to close back on you if you walk through slowly), just animate the closing door to swing past center but not as far as full open but opposite direction, then it swings back but not as far again, then not as far again (each time swinging past center). This is all animation. You don't need anything special. I'm fairly new at this so you can do it with a little animation experience. It took me awhile to learn the animation and triggering stuff but it can be done.
#10
06/28/2010 (4:30 pm)
yes but I want to use physx. I could do the animating and triggers bit with my eyes shut and that is the way I will be doing it if I can't get the PhysX stuff working I just wanted to try the PhysX road before the other one
#11
06/29/2010 (10:06 pm)
I created a close enough effect in max using physx but I get this error in torque

PxMultiActor_Notify::NXU_preNotifyActor, unsupported shape type (PLANE), on Actor ((null))
PhysX Error:
D:\sw\physx\PhysXSDK\2.8.3\trunk\SDKs\Physics\src\NpScene.cpp(890) : Supplied NxActorDesc is not valid. createActor returns NULL.
#12
06/30/2010 (5:24 am)
1. (T3D's)PhysX data only supports box, sphere, & capsule.(pyramid should be there as well but I would not count on it for T3D's sake)

2. This could be 1 of 3 things iirc:
a. it could be fixed after you switch out the plane for a flat box
b. Opencollada screws data sometimes, it just does, I would export the model file as DTS [or keep exporting DAE until it works].
c. the actor was initially not named correctly
#13
06/30/2010 (6:35 am)
that is what I don't get because I used boxes :S
#14
06/30/2010 (7:34 am)
shoot me over the files
www.ericrbarth.com/uploadpanel/view/eb.jpg
#15
06/30/2010 (4:22 pm)
i managed to get the shape in game without crashing but now I can't get it to open when the player collides with it and this error spams the console

PhysX Error:
D:\sw\physx\PhysXSDK\2.8.3\trunk\SDKs\Physics\src\NpScene.cpp(1076) : NpScene::createJoint: desc.isValid() fails!

#16
07/03/2010 (9:04 am)
so what do I do I have exausted all possibilities that I can think of
#17
07/08/2010 (3:16 am)
bump