Game Development Community

Parachutes

by Adam Beer · in Torque Game Engine · 01/02/2008 (2:37 am) · 3 replies

I would like to add parachutes to my game and I know how I want to do them, but there is some questions I need answered first. Firstly, heres my plan:

Have an image of the actual chute part (cloth part that is at the top) and have some physx shapes mounted to it by joints to make string like objects which can be seen in this resource video here at 0:09 into it:

www.youtube.com/watch?v=fEBvRhcVzLg

then mount a backpack to the 7 different strands of physx strings. The player then mounts to the backpack and the chute (top cloth part) has less gravity so it will slow down the players decent. Now my problem here is that I want the chute to grab on to the strings and the backpack to be hanging off the strings, but when the player mounts to the backpack, he is basicaly in control of it all and just falls with all his stuff on. I want the chute and the backpack to be in control of the player so when the strings move around, it will move the backpack which will move the player with it. My questions are:

1)How can I get the chute to have different gravity to when its added to the mission, it will float down instead of plummet toward the ground?

2)How can I get the chute to be incharge of the strings (strings move but chute doesnt), and the backpack to be incontrol of the players movements (swaying with the strings)?

Any and all help is appreciated greatly. Thanks.

#1
01/02/2008 (9:30 pm)
You would most likely have to treat the parachute like a vehicle, which the player
would then be mounted to. Gravity is easy enough. Search the resources for the
Dynamic Gravity mod. It allows you to dynamically change the gravity of players and
vehicles during game play.

You'll have to set the gravity mod of the parachute so that it floats down slowly.

Try not to get to technical in focusing on the chute, then the strings, then the backpack.
Treat it as one solid object and then just animate it as needed to get the proper "look"
from it. The only thing that really has to move is the handles that the player pulls on to
steer the chute. Beyond that you can just rotate the whole parachute object with the
player attached and it should look fine.
#2
01/02/2008 (11:59 pm)
I have figures out how to chnage the speed of the parachute when its falling. Just change the drag to 0.9. My only problem now is adding all the objects I need in script. All physx joints are added in the mission. Heres an example of a string of objects from the mission file:

new PhysXActor(SpecialBox) {
      canSaveDynamicFields = "1";
      position = "704 895 23.4816";
      rotation = "-0.00757456 0.000264432 0.999971 1.54151";
      scale = "1 1 1";
      dataBlock = "pxAirCrate";
	  actorID = 0;
   };
   new PhysXActor(SpecialPole) {
      canSaveDynamicFields = "1";
      position = "704 895 22.4816";
      rotation = "1 0 0 00";
      scale = "1 1 1";
      dataBlock = "pxJointPole";
	  actorID = 1;
   };
   new PhysXJoint() {
      Actor0 = 0;
	  Actor1 = 1;
	  GlobalAnchor = "704 895 22.9816";
	  dataBlock = "pxJointTest";
   };
   new PhysXActor() {
      canSaveDynamicFields = "1";
      position = "704 895 21.4816";
      rotation = "1 0 0 00";
      scale = "1 1 1";
      dataBlock = "pxJointPole";
	  actorID = 2;
   };
   new PhysXJoint() {
      Actor0 = 1;
	  Actor1 = 2;
	  Actor0Node = "mount1";
	  Actor1Node = "mount0";
	  dataBlock = "pxJointTest";
   };
   new PhysXActor() {
      canSaveDynamicFields = "1";
      position = "704 895 20.4816";
      rotation = "1 0 0 00";
      scale = "1 1 1";
      dataBlock = "pxJointPole";
	  actorID = 3;
   };
   new PhysXJoint() {
      Actor0 = 2;
	  Actor1 = 3;
	  Actor0Node = "mount1";
	  Actor1Node = "mount0";
	  dataBlock = "pxJointTest";
   };
   new PhysXActor() {
      canSaveDynamicFields = "1";
      position = "704 895 19.4816";
      rotation = "1 0 0 00";
      scale = "1 1 1";
      dataBlock = "pxJointPole";
	  actorID = 4;
   };
   new PhysXJoint() {
      Actor0 = 3;
	  Actor1 = 4;
	  Actor0Node = "mount1";
	  Actor1Node = "mount0";
	  dataBlock = "pxJointTest";
   };
   new PhysXActor() {
      canSaveDynamicFields = "1";
      position = "704 895 18.4816";
      rotation = "1 0 0 00";
      scale = "1 1 1";
      dataBlock = "pxJointPole";
	  actorID = 5;
   };
   new PhysXJoint() {
      Actor0 = 4;
	  Actor1 = 5;
	  Actor0Node = "mount1";
	  Actor1Node = "mount0";
	  dataBlock = "pxJointTest";
   };
   new PhysXActor() {
      canSaveDynamicFields = "1";
      position = "704 895 17.4816";
      rotation = "1 0 0 00";
      scale = "1 1 1";
      dataBlock = "pxJointPole";
	  actorID = 6;
   };
   new PhysXJoint() {
      Actor0 = 5;
	  Actor1 = 6;
	  Actor0Node = "mount1";
	  Actor1Node = "mount0";
	  dataBlock = "pxJointTest";
   };
   new PhysXActor() {
      canSaveDynamicFields = "1";
      position = "704 895 16.4816";
      rotation = "1 0 0 00";
      scale = "1 1 1";
      dataBlock = "pxJointPole";
	  actorID = 7;
   };

How can I make a single datablock to add the whole parachute with everything connected into the mission?
#3
01/03/2008 (1:13 am)
I'm not completely sure if this is what you want but you can call all of that from the mission in the script as it is. Of cause you'll want to get like the player's location, and set the spawned PhysX's at that location.