Game Development Community

My New Vehicle Type

by Barry Dahlberg · in Torque Game Engine · 12/05/2001 (10:44 pm) · 6 replies

Hello!

We are developing a RTS game using the Torque engine which will (hopefully!) have hundreds of little vehicles roaming about. Now all the vehicles currently in the engine have absurd amounts of crazy physics and stuff going on which simply isn't necasary for our game as we will be viewing everything from long range. So what I have done is a bit of copy/paste and created a new vehicle class where I have removed all of the funky physics.

1) Where is the best place for me to modify the vehicles position/rotation values directly? At the moment I am doing it in updateForces but I would think this is rather the wrong place!

2) How do I rotate the vehicle so that it slopes with the terrain but still keeps it's current heading?

3) How do I make the vehicle move forwards?! Making a vector (0, 1, 0), rotating it by the vehicles transform and adding it to the force almost works but gives strange results.

Thanks in advance for any help!
Barry

About the author

Recent Threads


#1
09/21/2002 (10:34 pm)
(bump)

I'm also interested in an RTS; does anyone have any ideas for #2?
#2
09/21/2002 (10:43 pm)
I'm curious as well. We're currently looking over the RTS possiblities..
#3
09/22/2002 (12:44 am)
Barry, its gonna be hard to get answers since most people dont know much about the engine, and those who do dont share the knowledge. I started work on a turret class and have gotten about as far as I can and my threads are still unanswered pretaining to certain functions within the engine. To answer one of your questions the player class has a function called "updateMove". Im not sure if the vehicles classes have this but I would believe that this would be the best place to adjust the rotation and such of your new class.

Im only typing this just as a warning so you dont get your hopes up about getting a solid answer.
#4
09/22/2002 (12:54 am)
Sam, what are you talking about? Usually you get qualified answers in these forums, and you get them very fast... so what you say is simply not true.
If you didn't get any answers yet, maybe your questions weren't clear enough, or they were buried by lots of other threads, or simply nobody has done it before or knows how to do it...
But it's really hard to follow all these threads here if you don't spend at least 2 hrs/day here to stay up-to-date...
I've been away for a week lately and there were about 800 new posts... :/
#5
09/22/2002 (2:08 am)
Yeah your right, maybe I did jump to conclusions. There are so many new threads made that it is hard to keep up, and its possible that some things may have not been done yet. But its so frustrating to see 30 posts in a thread about some stupid ban in greece on video games when questions could be answered and the important topics dont get bumped off the side forum list.

I usually go over all new posts every day and "If" there is something that I know I can help with I usually do. /me Just in a bad mood..Sorry.

Edit:

About ? #2 Barry.. If you are refering to Flying Vehicles one way to do this is by script. Just do a rayCast 100 meters out to check for terrain and other objects, if there is something in the way you can always increase the Z transform untill its clear and then return it to its normal flight height. This would require 2 casts, one to the front for the first check and one straight down to make sure you clear the object.
#6
09/30/2002 (6:32 am)
If you don't need the physics of a car, then why not just make a 'character' where the run/walk animation is the wheels turning.

I have not tried this, but I suppose it would be much easier than making a regular bot-character. You would have no bones, no physics, and only a few animation to make it look desent.