[BEHAVIOR] Chipmunk Physics

Post your completed addons to share with the community

Post » Thu Jan 01, 2015 11:03 am

I had installed it already.
B
108
S
26
G
272
Posts: 4,472
Reputation: 152,279

Post » Fri Jan 02, 2015 11:16 pm

Took a look at your collision example and just wanted to say that I'm looking forward to utilizing these features, it will be very useful having collision data! Haven't had a chance to fully get into using this yet, but I will.
I plan to remake some stuff I made in the past with box2d to see how it compares.
B
45
S
21
G
65
Posts: 1,118
Reputation: 38,227

Post » Sat Jan 03, 2015 2:40 pm

@R0J0hound

Does this support a concave polygon collision ? Or is it a bug that this doesnt work ?

Thanks

Edit: Sorry i just noticed you say they are converted to convex hulls. Is this a Chipmunk limitation?
You do not have the required permissions to view the files attached to this post.
B
48
S
16
G
9
Posts: 1,098
Reputation: 11,197

Post » Sun Jan 04, 2015 2:55 am

@spongehammer
It is, concave polygons need to converted to multiple convex polygons to work. That being said It should be possible to do this inside the behavior with no difference to the user. The problem is it's a more complicated feature to implement, but it is on my todo list.
B
92
S
32
G
110
Posts: 5,295
Reputation: 71,501

Post » Mon Jan 05, 2015 11:01 am

@R0J0hound

Can you tell me what segments are for and when they would be used. I looked at the Chipmunk Docs but i dont see where i would use them. What's the radius for?

Thanks
B
48
S
16
G
9
Posts: 1,098
Reputation: 11,197

Post » Mon Jan 05, 2015 8:27 pm

@spongehammer
Segments are basically lines with rounded ends, which are useful for level design.
In the picture the black is the collision shape. A negative radius insets inside the sprite. When segments are put together the rounded ends eliminate gaps that you'd get with boxes.
Image
B
92
S
32
G
110
Posts: 5,295
Reputation: 71,501

Post » Mon Jan 05, 2015 8:54 pm

Updated to version 1.1:
Fixed: bug with "set collision layers" action.
Fixed: bug with "apply impulse" action.
Fixed/Added: more support for Chipmunk2d's object sleeping behavior
Fixed: Collision shape wasn't always aligned properly.
Added: expression to get the uid of the other object of a joint.
Added: action to sleep or wake up an object.
Cosmetic change: moved the actions in the "velocity" action group to the "dynamics" action group.


Here's example using segment shapes, collision layers and the "pick closest object" condition to do a sonic the hedgehog like loop.
You do not have the required permissions to view the files attached to this post.
B
92
S
32
G
110
Posts: 5,295
Reputation: 71,501

Post » Mon Jan 05, 2015 9:21 pm

@R0J0hound

Ah, thanks for that and for all the work you are putting into this very useful behavior :)
B
48
S
16
G
9
Posts: 1,098
Reputation: 11,197

Post » Mon Jan 05, 2015 9:32 pm

woah, that's cool. I was recently wondering how to do a sonic loop.
B
45
S
21
G
65
Posts: 1,118
Reputation: 38,227

Post » Wed Jan 07, 2015 6:01 pm

Is there a way to set linear or angular damping per object? I find those to be essential features of the in-built physics behavior for tweaking movement & doing things like underwater effects. Prevent rotation is another handy feature that's missing, but I suppose it'd be easy enough to set these with events.
B
27
S
12
G
1
Posts: 157
Reputation: 3,359

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 8 guests