Simple Distance Based Physics

Post your own tutorials, guides and demos.

Post » Wed Jan 14, 2009 5:15 pm

Simple demo for doing basic collisions with distance and radius. The sprites are only representative, so there is not any pixel collision. Use arrow keys to move the green sphere.
[url:59qwfgup]http://dl.getdropbox.com/u/472186/Construct/Forums/DistancePhysics.cap[/url:59qwfgup]
B
30
S
15
G
10
Posts: 285
Reputation: 7,144

Post » Thu Jan 15, 2009 1:49 am

pretty cool. could come in handy somewhere along the line haha. :D
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Thu Jan 15, 2009 9:19 pm

This is very hard to read though. Shouldn't the the horizontal scroll bar be available? Is that a bug?
B
3
S
2
G
4
Posts: 271
Reputation: 2,017

Post » Thu Jan 15, 2009 10:34 pm

You can click and drag the right edge of the condition and resize it ;)
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Jan 16, 2009 9:46 am

[quote="stainsor":kv3chsr1]This is very hard to read though. Shouldn't the the horizontal scroll bar be available? Is that a bug?[/quote:kv3chsr1]

Sorry, it is resized to my monitor (1680x1050)

Another little update with multiple objects: [url:kv3chsr1]http://dl.getdropbox.com/u/472186/Construct/Forums/DPhysMultiObject.cap[/url:kv3chsr1]

The goal is to get the same effects but using the same objects :roll:
B
30
S
15
G
10
Posts: 285
Reputation: 7,144

Post » Fri Jan 16, 2009 5:58 pm

You dont need to use two for loops btw.

You can loop each 'pusher' and then use

Pick object by comarison: (use the same system comparison params)

and it works just the same but probably a bit faster :)
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Fri Jan 16, 2009 6:33 pm

Thanks David, I changed it and works well :D . Is this method faster than collision? Is posible to get the same effect but with one object type? :roll:
B
30
S
15
G
10
Posts: 285
Reputation: 7,144

Post » Fri Jan 16, 2009 7:34 pm

[quote="Aritz":mqs22uvv]Thanks David, I changed it and works well :D . Is this method faster than collision? Is posible to get the same effect but with one object type? :roll:[/quote:mqs22uvv]

Quote from another topic:

[quote="Drasa":mqs22uvv]The only propely working solution is to apply two families to same object type, and make conditions where "Family A" overlaps with "Family B" to distanguish the different instances. There have been discussion about this before, [url:mqs22uvv]http://www.scirra.com/phpBB3/viewtopic.php?f=3&t=1541&st=0&sk=t&sd=a&start=20[/url:mqs22uvv], [url:mqs22uvv]http://www.scirra.com/phpBB3/viewtopic.php?f=16&t=1667[/url:mqs22uvv] and [url:mqs22uvv]http://www.scirra.com/phpBB3/viewtopic.php?f=17&t=1740&p=12449[/url:mqs22uvv][/quote:mqs22uvv]
B
3
S
2
G
5
Posts: 263
Reputation: 2,201


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests