n1000
29-03-2007 01:42:03
I have a tank built with all the wheels attached to the main hull of the tank body. I'm not trying to deal with using physics for the tank tracks. I just want to add the proper force to each wheel to make the tank move forward and backwards.
I've read through the forum and it seems that calling "addLocalForce" in each of the tank wheel callbacks is the way to do it. I am also assuming that I should make another "addforce" call with a -9.8 on the Y axis for gravity in each callback as well.
So my question is, how do I calculate the force vector to use as the first parameter in addLocalForce? I want the force to be in the direction the wheel is pointing but I'm not sure how to calculate this.
Thanks in advance.
I've read through the forum and it seems that calling "addLocalForce" in each of the tank wheel callbacks is the way to do it. I am also assuming that I should make another "addforce" call with a -9.8 on the Y axis for gravity in each callback as well.
So my question is, how do I calculate the force vector to use as the first parameter in addLocalForce? I want the force to be in the direction the wheel is pointing but I'm not sure how to calculate this.
Thanks in advance.