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)
irrNewt - vehicle problems
-
- Posts: 157
- Joined: Tue Mar 20, 2007 8:30 am
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
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
Tell me what you cherish most. Give me the pleasure of taking it away.
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: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.
I'll go post an update in that thread for you. Don't want to spoil this thread (linky for lazy people )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
-
- Posts: 269
- Joined: Tue Oct 31, 2006 3:24 pm
- Contact:
i'll check that, however chassis and tires have the same materials (chassis' material) in NewtonYeah, 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.