Author Topic: Adding movement code from Multi-Purpose Game starter kit to game  (Read 2898 times)

image28

  • Guest
I've been trying to add the movement code from the multipurpose game starter kit to my game for a day now, but my tank player will not move, He does however try to fire when I press the space bar.... but accepts no other keyboard inputs.... my character is spawned at a random point on game load... all I have done so far is copied how the scripts are attached in the kit...

image28

  • Guest
Re: Adding movement code from Multi-Purpose Game starter kit to game
« Reply #1 on: August 27, 2013, 09:56:46 AM »
Ok figured out where the problem is... the models we are using are a lot larger.... when I copy the example tanks box collider values and paste them into our models collider, we get movement but the physics are wrong, are there any settings I need to change for a larger model... it wont move at all when I scale the box collider to fit our model....

image28

  • Guest
Re: Adding movement code from Multi-Purpose Game starter kit to game
« Reply #2 on: August 27, 2013, 10:08:16 AM »
Playing with the suspension and wheel radius gets it moving, but still the physics are wrong, need to figure out a way to calculate those value for our model, also the center of gravity might need adjusting....

image28

  • Guest
Re: Adding movement code from Multi-Purpose Game starter kit to game
« Reply #3 on: August 27, 2013, 10:26:27 AM »
Adjusted the collider box to just cover the top half of our model, and changed the center of mass from -0.35 to -4... that helped a lot, the model moves correctly now.... rarely the model flips over, so going to add code to detect when that happens and respawn the model in the same spot, right way up.... now just got to work out the correct way to increase the movement speed, bigger model needs to move faster....