Game Development Community

Bug: Only one wheel model available in TGE

by Ken Finney · in Torque Game Engine · 05/16/2002 (10:50 pm) · 4 replies

Don't know why it took so long for me to notice this: you can only have one of your wheels used in the engine, and it is the type belonging to the vehicle file you exec last.

For example, I have a Land Rover - nice big knobby tires, and a skateboard - little wide polyurethane wheels.

If I exec the skateboard.cs file last, then the skateboard is ok, but the Rover gets the tiny little orange wheels that the skateboard uses and can't go anywhere. If I exec the Rover last, then it's ok, but the skateboard ends up with the big knobby tires, and proceeds to bounce out of the known universe ...

#1
05/16/2002 (11:31 pm)
hmm this is prolly because you are redefining the :
WheeledVehicleData::onAdd(%this,%obj)
with your next wheel maybe?
what should be done here is define the onAdd for your datablock by using the datablock name to define the function instead of WheeledVehicleData
#2
05/17/2002 (2:39 am)
Badguy is correct.. you must use the setwheeltire function in your spawning code.. wheeledvehicle::onadd in the example script will set them for every wheeled vehicle when you add it.

So you would remove that function call from the general wheeledvehicle::onadd and make mywheeledvehicle::onadd for each vehicle and set the tires there. Same with the springs.

hope this makes sence its 6am heh.
#3
05/17/2002 (5:29 am)
When I get back from Buffalo, I'll post a snippet that defines multiple wheel types.
#4
05/17/2002 (6:11 am)
Bingo ! - thanks Badguy & Wallace, that was it. I'd actually tried that in my flailing around last night, but had a typo, so it didn't work, and I didn't notice the typo...


OK, cancel this bug alert :-)