How do I preserve car drifting using physics?

Get help using Construct 2

Post » Sun Feb 07, 2016 2:55 pm

The car moves and drift well but when i add the "physics" behaviour the car stops drifting and move/rotate perfectly.

So, how can i get Car+Physics behaviour without lose the "drift recovery" from the Car behaviour?

Here is the capx:
https://dl.dropboxusercontent.com/u/659 ... test1.capx

Enable/Disable the Physics behaviour to see the problem.

Edit: I need the physics for other car/objects collisions
B
23
S
10
G
3
Posts: 538
Reputation: 4,426

Post » Sun Feb 07, 2016 5:00 pm

Updated the example adding another car to test car+physics collisions.

I'm trying to set some physics parameters as the car ones to avoid the physics remove the "dirft recovery" behaviour but without success :( .

Any idea?
B
23
S
10
G
3
Posts: 538
Reputation: 4,426

Post » Sun Feb 07, 2016 10:28 pm

Maybe try this behavior:
behavior-car-physics_t69925?&hilit=car+physics

The normal car behavior doesn't play well with physics
B
89
S
30
G
95
Posts: 5,157
Reputation: 63,450

Post » Mon Feb 08, 2016 8:56 am

R0J0hound wrote:Maybe try this behavior:
behavior-car-physics_t69925?&hilit=car+physics

The normal car behavior doesn't play well with physics


@R0J0hound , Not works, error with the plugin to read "joints" :S
Image

The behaviour is from 2012 , i guess now some things changed and not works well :S

Somebody know how to solve it? @CodeMasterMike ?

EDIT: Well Seems i can set for my project, but i can't open the examples and get this error ¿? mmm

Well, i go to test the plugin to see if i can get this works.



EDIT 2: Nothing! In the moment i set the wheels(I guess the joints) when i try to run i get the error i posted above.

EDIT3: Here is where seems to crash:
Code: Select all
var leftJointDef = new Box2D.Dynamics.Joints.b2RevoluteJointDef();
B
23
S
10
G
3
Posts: 538
Reputation: 4,426

Post » Mon Feb 08, 2016 4:55 pm

And without that, there is no way to use the Car Behaviour + Physics without lose the drift recovery? Or Car behaviour + something to give some kind of collisions that works?
B
23
S
10
G
3
Posts: 538
Reputation: 4,426

Post » Mon Feb 08, 2016 7:25 pm

Hmm, I don't know why it does that. I really don't enjoy diving into javascript to debug something I didn't write.

You could probably do something else, maybe with just the physics behavior? Either by modeling how the car physics really works or fake it somehow. What i'd do is make a list of things I want to do and figure them out. If any are too complex, I'd break them down further till I just have a bunch of simple things I can do that I piece back together.
B
89
S
30
G
95
Posts: 5,157
Reputation: 63,450


Return to How do I....?

Who is online

Users browsing this forum: ankas, tetuan and 6 guests