Tank Movement

0 favourites
  • 4 posts
From the Asset Store
Run and Jump in 3 Dimensions! Take your platformer to the next level!
  • Hi! I recently began using Construct 2 and am loving it.

    I'm creating a top-down game in which the player controls a tank. I need to use physics. However, I have a problem. If I use forces and torque to move the tank, it drifts, even though the linear and angular dampening are set to 1. Using Set Velocity and Set Angular Velocity works for driving the tank, but causes issues when it interacts with other objects.

    Is there a way to use forces and torques to move the object, but simulate friction with the floor so it doesn't drift while driving?

    Thank you!

  • Today I tried simulating friction through code:

    System -> Every Tick -> Tank -> Apply Force -> X: -0.1 * Tank.Physics.VelocityX, Y: -0.1 * Tank.Physics.VelocityY

    System -> Every Tick -> Tank -> Apply Torque -> -BlueTank.Physics.AngularVelocity

    It's progress, but I still can't eliminate the drift and I'm sure there's a more elegant method.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It might be my limited imagination, but what is the benefit of using the physics behaviour on a top-down game?

    As a tank can only move forward in the direction it is facing, you could probably incorporate that in your events..

  • Much of the game involves the tanks pushing objects and their motion needs to be affected when they collide into each other, are shot or collide with an immovable object.

    Thank you for your input. Only allowing the tank to move along its forward/backward axis is a good idea. I'll play around with it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)