Game Development Community

Car7Buggy Help Plees

by StigDesign · in Game Design and Creative Issues · 11/20/2011 (9:16 pm) · 33 replies

Hello all i have Torque3D v1.2 and i whant to change buggy the sand car red one to behave like a car instead of a monster truck/buggy handling enny one here know how to get that to work+controll only with wasd or arrow keys. Thanx alott in advance if some one helps :D
Page «Previous 1 2
#1
11/21/2011 (1:26 am)
there is a resource to controll only with wasd or arrow keys

do a search with this:
"Vehicle Camera Mouse Control - Driving and Looking"
#2
11/21/2011 (1:38 am)
Thanx al chekk that :D
#3
11/21/2011 (10:25 am)
Behavior of the vehicle can be adjusted by modifying the various properties in the vehicle's datablock - most of which have a one line comment explaining what each does.

It's mostly a bit of fiddling instead of saying do this and this and the car will operate like so.
#4
11/21/2011 (1:40 pm)
I would first NOT power the front 2 wheels....

Then I would adjust the damping on the springs...way too bouncy.

Then I would probably adjust the engine torque...to stop the crazy spinouts....

That will go a long way to getting a 'car' feeling vehicle; instead of a super shocked dirt racer....

'Vehicles' can be tricky; especially if you are adding a 'custom' one. There is a direct relationship between the art and the datablock. Your datablock values for spring 'length' is the total amount you've animated your 'hub' nodes. Using the existing asset and merely adjusting the datablock may not produce the 'vehicle' you want.

I'm just about ready to drop the 'policeVan' from "Chinatown" demo onto a frame that runs....heh-heh-heh.
#5
11/22/2011 (11:08 am)
Thanx for the replys :D @ahsan didnt find that line or enny like :S'
@ Michael yes it is i tried in the older torque did get it more as a Monster truch lol
@Rex thanx al test thoes
yes at start i whant to get the standar red buggy one to work then maby get my own car etc, yes had that in minde asdwell lol cars from chinapack XD
#6
11/22/2011 (4:38 pm)
do not know how u have searched!!!
but it came very first in my search.here it is:
http://www.garagegames.com/community/blogs/view/17759


if u try it,then try to give a answer to my this question:
http://www.garagegames.com/community/resources/view/17759/1#comment-179220
#7
11/22/2011 (4:40 pm)
al chekk i searched in the Default.cs script on on nett :) but i chekk thoes link now out Thanx :)
#8
11/22/2011 (5:15 pm)
now i have done that thing lol damn work but how do i compile or does it on it own? :)
#9
11/22/2011 (5:27 pm)
btw wherei cheked whas in deafult car.cs adn cheeta.cs datablock i think in the older TGE 1.4. if i remember is where i changed before and made the buggy act more like a monster truck but allways to way swaying etc lol
#10
11/22/2011 (6:23 pm)
You do not need to compile script, just run the game with your newly modified and saved script(s).

Unless you have DSO generation turned that is all you need to do. If DSO generation is on you'll have to delete the old filename.cs.dso files.

The Resource that Ahsan linked will need the source code modifications to be done in Visual Studios in which you will need to re-compile the project in order to generate a new exe/dll. That Resource is an example of how to separate camera control from the vehicle driving/movement control.

Simply changing the keybinds for what/which keys controls the car will take place in "scripts/client/default.binds.cs". Once you change a preference remember to delete old .prefs.cs files, and if you've changed keybindings you'll need to delete the old config.cs file as well.
#11
11/22/2011 (6:48 pm)
There is a Resource that has some script to improve the steering of a vehicle when using a keyboard... but a quick search didn't reveal it to me so you'll have to do some digging. I recall that it in combination with the return to center Resource for wheeled vehicles did allow much better control behavior than the stock controls give you.
#12
11/22/2011 (8:14 pm)
Thanx Michael. about the scripts i youst save in thorsion then re runn level editor and camera to player and testing. lol not sure if that is easyest way to test after changes in scripts eks cheeta default car etc. am not sure what dso is and what they are :S i do have Visual studio 2008.last one al chek that out. so there isnt enny easy way to chan ge from mouse controll to wasd or arrow keys then alott of work lol
#13
11/23/2011 (11:54 am)
If all you want is movement keys based on WASD or the arrow keys, that's easy.

By default, movement control already uses the WASD keys. The problem for vehicle movment is that vehicles don't strafe - or they shouldn't.

The defaults for the keybindings are found in "scripts/client/default.binds.cs
You have a couple of options. You can change the W & D keys to use the turning functions (instead of moveleft/moveright). You can set up the arrow keys to use the various movement functions. You can use these two solutions in combination, but keep in mind that this will change your movement control of the player as well. You can work around this by creating a separating actionMap for when you're in a vehicle. Action maps are a way of creating unique keybindings depending on what you're doing in game. I'll not cover actionmaps for now, but do remember the concept as something to explore further.

Go to "scripts/client/default.bind.cs", scroll down to around line#215 or so and you'll see a bunch of moveMap.bind() commands. This is how to add arrow key movement controls:
moveMap.bind(keyboard, left, moveleft);
moveMap.bind(keyboard, right, moveright);
moveMap.bind(keyboard, up, moveforward);
moveMap.bind(keyboard, down, movebackward);
Using the pre-defined turn left/right functions will better simulate vehicle control.
#14
11/26/2011 (3:35 pm)
@Michael hall.
yes first iw hant to add so that i can use wasd& or arrow keys for turning the buggy car or the car then i what to change car physics so that it dosnt
spinn off and suthc easly make it more like monzster truck or normal car behaviour :) sorry for lait reply btw :D
#15
11/26/2011 (3:39 pm)
now i see inside the script ad that position in torsion so what do i do here replace pitch or yaw with move left or move right? am new to troque&torque3D scripts and rest only familiar with level editor lol
#16
11/26/2011 (3:41 pm)
i copy and patse your commands now and try to test :D
#17
11/26/2011 (4:54 pm)
i supose that is in that file controls are but i realy dont reconize where car movement controls are btw am using a full theme plate to start my project with and i firstly whant to make so that stearing can be done with wasd&arrow keys and same effect likie nfs3 4 testdrive 4 5 6 kes meaning that when you turning left and lett go the key the whels self center ti self to face forward. i realy hope to either get help on changing so that this works or a file to replace lol :D enny how realy like response and coments :D so am still thanking for all the help i have gotten so far and might get more :D :)
#18
11/26/2011 (5:28 pm)
in my first try with t3d i also tried to search for the vehicle movement control in script.but the bad thing is there is nothing related to vehicle movement in script.in t3d u have to do that in source c++.

and for that first u have to understand some engine structure and some +++.and time is a big factor for that.

that is why i abandoned my vehicle feature from my game.

why not try deepscratch's advance vehicle kit.it will cost a bit heavy to only change the movement key.but u will be able to do some more than u r want.

if u only want to change movement key than stop searching in script.and give some time to learn about how to compile source in visual studio express edition and then add that resource i pointed to u.if u need than i can send u the source file.but i think u can easily edit that vehicle.cpp file.
#19
11/26/2011 (5:41 pm)
you mean that old car kit that whas for sale or the tread you gave me wher i needed to add to source then compile. yes i probly need to get in to the source and get used to that lol.for me torque3d is like when i started with 3dsmax9 at first it whas hard but after lon time and reading tutorials videos etc i gotten used to it now its easy to use same is with darkbasic pro fpscreator qbasic etc so i pårobly need to get in to c+ in teh source and see if i can get a hang on it btw i added thoes commands from that tread so think i might only need to copile now. Thanx :)
#20
11/26/2011 (6:00 pm)
am Changing to my Doom t-shirt(loking litle like John Carmak)XD then digging in to the main engine and see how and where to compile :)
Page «Previous 1 2