How do I caterpillar / Bulldozer-like controls ?

Get help using Construct 2

Post » Fri May 19, 2017 11:30 am

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
B
5
S
1
Posts: 45
Reputation: 463

Post » Tue May 23, 2017 5:00 pm

https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Tue May 23, 2017 8:22 pm

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
B
5
S
1
Posts: 45
Reputation: 463

Post » Thu May 25, 2017 8:35 pm

Why does your vehicle have to be on a road more narrow than its collision box?
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Fri May 26, 2017 9:27 am

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.
B
5
S
1
Posts: 45
Reputation: 463

Post » Tue May 30, 2017 3:04 pm

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.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Sun Jun 04, 2017 8:31 pm

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
B
5
S
1
Posts: 45
Reputation: 463

Post » Tue Jun 06, 2017 3:04 pm

No problem. I am here to offer oblique ideas and inconvenient truths. :-p
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857


Return to How do I....?

Who is online

Users browsing this forum: babymumu and 7 guests