irrNewt - vehicle problems

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
death_au
Posts: 38
Joined: Tue Apr 17, 2007 9:48 am
Location: Australia

irrNewt - vehicle problems

Post by death_au »

Hi, I'm working on a tank game, and need some help getting things right in my head.
I have a tank which is modeled on the irrNewt car tutorial (I've basically started with that and edited it). I've made the wheels invisible, and it is now controlled by two keys only (the left key moves the tank forward and turns it right, the right key moves the tank forward and turns it left, and holding both moves the tank forward with no turning).

My problem is that I've been playing with the torques in order to give the tank the power to get up hills, but at the same time, I don't want the tank to go fast. I figure it's a matter of setting the friction of the tires or something higher, but I don't know how to do that. There doesn't seem to be any variables or methods off the tire class or the car class to introduce the friction.

Does anyone know how to do this? (I'm assuming it's just something simple)
olivehehe_03
Posts: 157
Joined: Tue Mar 20, 2007 8:30 am

Post by olivehehe_03 »

Friction is controlled through materials. Basically you'll need to have 2 materials, one for the tires and one for the level, and then set the friction between them to a certain amount, just check the IrrNewt examples for the material stuff.

Alos, i saw your post not too long ago about getting the tank to move properly and I'm curious about how you ended up doing it, because it might help me out with my game :D
Tell me what you cherish most. Give me the pleasure of taking it away.
death_au
Posts: 38
Joined: Tue Apr 17, 2007 9:48 am
Location: Australia

Post by death_au »

olivehehe_03 wrote:Friction is controlled through materials. Basically you'll need to have 2 materials, one for the tires and one for the level, and then set the friction between them to a certain amount, just check the IrrNewt examples for the material stuff.
Yeah, I had a look at that, and I am setting up some friction between the chassis and the world, but the tire objects don't seem to have materials. Is this correct? The friction needs to be between the wheels and the world.
olivehehe_03 wrote:Alos, i saw your post not too long ago about getting the tank to move properly and I'm curious about how you ended up doing it, because it might help me out with my game :D
I'll go post an update in that thread for you. Don't want to spoil this thread :P (linky for lazy people :P)
Image
white tiger
Posts: 269
Joined: Tue Oct 31, 2006 3:24 pm
Contact:

Post by white tiger »

Yeah, I had a look at that, and I am setting up some friction between the chassis and the world, but the tire objects don't seem to have materials. Is this correct? The friction needs to be between the wheels and the world.
i'll check that, however chassis and tires have the same materials (chassis' material) in Newton
Post Reply