Side view carlike physics

For questions about using Classic.

Post » Thu Feb 03, 2011 8:42 pm

Hey, everybody. I have had this little project in mind that's basically a little agile tank thing going around on bumpy terrain and fighting things. An early prototype looks like this:



And you can get the CAP here: http://dl.dropbox.com/u/1328856/ProtoJack.cap

Now here's the question: I'd like it to behave more like a vehicle, with suspension, etc. Currently using physics it is somewhere on its way there, but not quite. Now this topic had a discussion with examples, but unfortunately the file host is dead and no-one seems to have the caps. Has anyone got any tips (preferably explained in an idiot proof way) on how to implement suspension for the little beast?

Cheers.

Edit: Almost forgot - if you do grab the cap holding space will spawn rocks to have some physics interaction fun while pressing up will blast those rocks around to clear the space up a little.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Fri Feb 04, 2011 3:25 am

You might give the custom movement behavior a try.
I can tell you one thing. The triangles wont give proper collision detection at negative values.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Fri Feb 04, 2011 6:06 am

Instead of using a hinge try using the spring action - i think it needs to be applied every frame. I cant really remember what values would be good, but just give it a try.
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Fri Feb 04, 2011 9:35 am

[quote="David":1ikpbpjr]Instead of using a hinge try using the spring action - i think it needs to be applied every frame. I cant really remember what values would be good, but just give it a try.[/quote:1ikpbpjr]

Every frame, d'oh! Thanks, David. I read about it, added one at the start of the layout and nothing happened. Now by using it always and adding a force between the wheels to sort-of hold them together the result is much better (also the cap is updated at the link above):



Thing is, there seems to be no way to point the forces at image points, thus the "base" just hangs there and spins around since it's only held by something right in the middle.

One idea I had was to disable rotations for it and just do a "Always - Base angle = Angle between the wheels", but that seems sort-of messy, is there a nicer, physics based way?

[quote="newt":1ikpbpjr]You might give the custom movement behavior a try.
I can tell you one thing. The triangles wont give proper collision detection at negative values.[/quote:1ikpbpjr]
Not sure if custom movement can supply all the wigglyness that the physics one can. But if this doesn't work out I'll give it a try. Speaking of triangles - had that problem, but placing the image point right in the middle solved it. Besides, these are just test graphics anyway.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests