jujubs
Member
Hello everyone. So, I've been trying to pull this off by myself for a while now, but had no luck.
Basically, I want to make a tank in which I control each track individually. I've set up my controls so that W and S roll the left track and Up and Down roll the right one, so if I press just Up or just W the tank spins, while I'd have to hold both keys to move forward.
The thing is, I only managed to pull this off by using the built-in physics system, which also brings up lots of other stuff I don't really need. Also, I'd like the tank to spin on its right track when I accelerate the left one, and vice versa, but all I get is it spinning around the origin (which is right in the middle). Oh, and the left track isn't quite working. The whole tank moves forward when I press it, even though it's basically the right track's code but inverted. My tank's step event looks like this:
I've tried using torque and force as well, but it just kinda turned into a huge mess. So, any tips on an easier way to accomplish this?
Basically, I want to make a tank in which I control each track individually. I've set up my controls so that W and S roll the left track and Up and Down roll the right one, so if I press just Up or just W the tank spins, while I'd have to hold both keys to move forward.
The thing is, I only managed to pull this off by using the built-in physics system, which also brings up lots of other stuff I don't really need. Also, I'd like the tank to spin on its right track when I accelerate the left one, and vice versa, but all I get is it spinning around the origin (which is right in the middle). Oh, and the left track isn't quite working. The whole tank moves forward when I press it, even though it's basically the right track's code but inverted. My tank's step event looks like this:
Code:
if keyboard_check(ord("W"))
{
physics_apply_local_impulse(0, 32, 0, -.1);
}
if keyboard_check(vk_up)
{
physics_apply_local_impulse(32, 32, 0, -.1);
}