How do I caterpillar / Bulldozer-like controls ?

0 favourites
  • 8 posts
From the Asset Store
Supports keyboard, mouse and gamepads. Supports several gamepads at once.
  • Hi,

    I'm trying to simulate a caterpillar-like control. Means: as if the vehicle is steered by two chains like also a tank is. There will be two joystick, one for forward & backwards and one for left & right.

    Right now, I'm working with a car behaviour for forward & backward and a rotation-event for the steering. This works alright, but the bulldozer is sliding when it accelerates against walls.

    Awkwardly I pinned some detector-sprites around the vehicle that set the car-behavour-speed to zero when overlapping walls. But I'm sure, that's not the most elegant way. And does not works too well. Can someone help me out with that. Maybe a custom control, which I'm not too familiar with?

    Thanks,

    Held

  • Hi,

    thanks.

    The current status of my thing is:

    As it is a quite small sprite, I'm satisfied with one rotation point. The 'feeling' of the steering is quite nice. In combination with the acceleration and deceleration of the car-behaviour! And, I guess, that's where my problem is coming from: The vehicle drives on a narrow road with solids on both sides / walls. More narrow than the collision box of the vehicle itself. So, when it tries to turn 180 degrees around, the sprite jumps / teleports to the next free space it can fit. (I guess so) I think it's mentioned in the scirra-docs.

    So, is there a way to bypass this reaction? That would be nice as my controling itself is alright.

    Or do I have to forget about the car-behaviour totally and find another way.

    Maybe you / someone can help me out.

    cheers,

    held

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Why does your vehicle have to be on a road more narrow than its collision box?

  • Because it`s like that

    The car, set straight, fits on the road. Only when it tries to turn around, it's getting contact with the walls.

    It's a bulldozer in a mine. And it's damn narrow there. Part of the game.

  • I think you are going to have to not use the car-behavior in your specific case. It was never designed to work in narrow passages. Or perhaps disable it temporarily while you are in that specific location.

  • I came to the same conclusion like you. I've used an invisble sprite with car-behaviour and pinned one detector-sprite on the front and one on the back. Every time the detector overlapps the wall, certain car-behaviours get disabled. And vice versa. Still feels a little awkward but is alright for my purpose.

    Thanks for thinking with me!

    cheers,

    held

  • No problem. I am here to offer oblique ideas and inconvenient truths. :-p

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