Game Development Community

How do I add a new flying vehicle to T3D?

by Sasuga · in Torque 3D Professional · 02/13/2010 (6:49 pm) · 9 replies

The post title might be a little bit of a misnomer.

HERE IS THE SITUATION:
I am able to create a new flying vehicle by copying and editing the defaultCar.cs file. The flying vehicle appears in the "Library" under "Scripted" in the T3D world editor. When I click on the flyingVehicle in the list I am able to get a flying vehicle that looks exactly like the buggy without the wheels. It hovers and floats up and down, I can mount it with my character and fly it around (for a bit until I wreck).

Great, that works! Now I want to give it a new body...

I've created and exported 'airplane.dts' with Milkshape and placed the new .dts in the same folder as the buggy.dts (for testing purposes).

I then altered the flyingVehicle script so that it no longer says 'buggy.dts;' and now says 'airplane.dts;' and altered nothing else.

HERE IS THE PROBLEM:
The flyingVehicle no longer shows up in the list with the defaultCar under "Scripted" and "Vehicles" or anywhere in "Scripted" for that matter.

When I look under "Meshes" I can find the airplane.dts right where I put it, and the airplane.dts can be imported into the mission without any problems as a static object.

TESTING:
When I change the flyingVehicle.cs back to the way it was with the "buggy.dts" as the shape and re-run T3D I am once again able to see the flyingVehicle in the list with the defaultCar.

NOTES:
The only thing I am changing is the shape. I have checked my path, spelling, and the semicolon more times than I care to count now.

QUESTION 1:
Could someone who has imported a new vehicle (preferably flying) tell me where I'm going wrong? Someone who has done what I'm trying to do, could you help me?

QUESTION 2:
Could someone at a GarageGames make a video tutorial for this sort of thing? Point out the reasons why this isn't working or what could cause the importing to fail in the video? I'd like to see a tutorial that goes from off-the-shelf T3D to having a flying vehicle that the character and jump into and flies off into the virtual sunset with.

IN ADVANCE:
Your help will be appreciated (by me, and by those who come after me with the same problem).

#1
02/13/2010 (7:31 pm)
Are you seeing anything in your console.log when it is loaded?
#2
02/13/2010 (7:51 pm)
Moved to the Torque 3D forums.
#3
02/13/2010 (11:06 pm)
*** THESE ERRORS FIXED ***

Executing art/datablocks/vehicles/defaultCar.cs.
Executing art/datablocks/vehicles/spaceVehicle.cs.
Namespace::unlinkClass - cannot unlink namespace parent linkage for SpaceVehicle for Vehicle.
Error: cannot change namespace parent linkage of SpaceVehicle from Vehicle to SpaceVehicleData.
Executing art/datablocks/vehicles/flyingVehicle.cs.
Namespace::unlinkClass - cannot unlink namespace parent linkage for FlyingVehicle for Vehicle.
Error: cannot change namespace parent linkage of FlyingVehicle from Vehicle to FlyingVehicleData.
VehicleData::preload failed: Vehicle models must define a collision-1 detail
77: preload failed for FlyingVehicle: .
Namespace::unlinkClass - cannot unlink namespace parent linkage for FlyingVehicle for Vehicle.

=-=-=-=-=
I'm getting a ton of errors, I don't know what they all mean.

Console Log: http://pastebin.com/me3b4360
#4
02/15/2010 (8:23 pm)
The only error I'm seeing that makes sense this one over and over:

GFXPCD3D9Device::beginScene - Device needs to be reset, waiting on device...

http://pastebin.com/m10b15186
=-=-=-=-=

The vehicle works when I use the defaultCar model buggy.dts. When I use my model it still freezes up when trying to mount it.

I think I'm missing something else, like when I was missing the 'collision-1'... but I'm not seeing anything in the log that makes sense to me.
#5
02/15/2010 (9:23 pm)
What do I need besides collision-1 in order to get my model to work? I've looked in the Torque Documentation under the Artist guide...
#6
02/15/2010 (10:06 pm)
kinda feel silly asking this but do you have a mount point?
#7
02/15/2010 (11:36 pm)
Yes,

I tried mount, mount0, mount1, and mount-0, and mount-1.

The effect happens the same with each.

Good question though. I hadn't tried it until after the collision error was found.

I thought Torque treated the centeriod for everything it doesn't have (mount point, eye, camera, etc.).

But I've tried adding these things as well, and so far same problem. Thank you for asking though. :)
#8
02/15/2010 (11:46 pm)
Alright,

I haven't fixed my problem yet, but I think I am on the right track with the help of this thread I found:

http://www.torquepowered.com/community/resources/view/6562
#9
02/16/2010 (6:03 am)
As long as I use all the nodes that the resource above uses my models work. For some reason if I don't have a mass point my models don't work. I thought Torque used the centeroid as the center of mass unless otherwise told? In any case, I got things working now.

Thanks, those of you who offered and tried to help.