[BEHAVIOR] Chipmunk Physics

Post your completed addons to share with the community

Post » Thu Mar 26, 2015 5:46 pm

@R0J0hound
Yes, I applied to the ball elasticity greater than 1 , but can not make the jump and hit the head of the character can boost while colliding with coins .
B
43
S
11
G
2
Posts: 111
Reputation: 3,858

Post » Fri Mar 27, 2015 8:30 am

Thanks for the reply. Would it be too much of a pain to ask for independent control of the chipmunk timescale? I guess I can disable the behavior or sleep physics objects that aren't part of the menu.
B
14
S
5
G
1
Posts: 189
Reputation: 1,536

Post » Tue Apr 07, 2015 8:46 am

@R0J0hound

Is there any way in which the shape of the object or the collision polygon can affect the center of mass. As it stands a pivot placed at the center of a pendulum shaped sprite does not cause the object to settle with the weight at the bottom as you would expect.

Edit: Or maybe allow the user to set the COM ?
B
50
S
16
G
9
Posts: 1,098
Reputation: 11,237

Post » Tue Apr 07, 2015 4:26 pm

@spongehammer the only way you can currently do this is by constraining a second invisible non-colliding object to the first, but I also think it'd be handy to manually set CoM. I'm doing a physics platformer & having a lower CoM for the player would help in a few cases. Maybe we shouldn't distract Rojo from his wrapper project though ;)

Someone mentioned kinematic objects a couple of pages back, & I've just managed to get a moving platform to work with physics object so here's the results:

https://dl.dropboxusercontent.com/u/523 ... tform.capx

It's hacky but seems to work. A kinematic object should have infinite mass but this has a very high one (as in hold-down-the-9-key high). The platform has its velocity set directly, so gravity isn't a problem. The other defining characteristic of a kinematic body is i think that touching objects shouldn't be allowed to sleep. This didn't seem to happen so there's no events dealing with that.

& don't laugh at my smooth cornering code.
B
27
S
12
G
1
Posts: 157
Reputation: 3,359

Post » Tue Apr 07, 2015 5:04 pm

@spongehammer
For shifting the CoM as mattb said is to attach multiple objects together. At least for now that's the only way.

@mattb
Looks good, you can also utilize the "on pre step" condition to negate the acceleration of gravity on the object, but looks like it's working well as is.

The wrapper project is stalled currently. I'll pick it up again eventually though.
B
94
S
33
G
114
Posts: 5,359
Reputation: 73,779

Post » Tue Apr 07, 2015 5:12 pm

@mattb

@R0J0hound

thanks for the response.

I had thought about another object but thought i would check first. It wouldnt have been the first time i had missed something ;)

Thanks for the example, very nice :) You can set the mass with an event if you want it infinite although i dont see any difference.
B
50
S
16
G
9
Posts: 1,098
Reputation: 11,237

Post » Mon Apr 13, 2015 2:25 pm

Could anyone tell me as where is the documentation for this behavior as on their site I have got unity & coscos documentation but nothing mentioned about construct2 ???
Image
B
36
S
13
G
1
Posts: 99
Reputation: 3,051

Post » Mon Apr 13, 2015 4:29 pm

Just wondering if anyone has used this physics library for a mobile (mainly Android) game?

@R0J0hound essentially I am looking for a more lag free version of C2's physics engine. Ever since one of their updates when Ashley started working on physics and overhauled some things, my game has been running poorly.

So, I need some alternate physics.
ImageImageImageImage
B
62
S
19
G
51
Posts: 633
Reputation: 30,836

Post » Mon Apr 13, 2015 4:39 pm

@DatapawWolf

As i recall R0J0hound says it should work. I dont think the performance will be any better though. Not tried it myself.
B
50
S
16
G
9
Posts: 1,098
Reputation: 11,237

Post » Mon Apr 13, 2015 5:17 pm

@miketolsa
There is no documentation written, although the official documentation can be referenced for some info since a lot of it is the same. There are a lot of little documentation tidbits in the descriptions when adding conditions, actions, and expressions.

@DatapawWolf
You'd have to try it and see if it performs better. I haven't used any mobile exports at all.
B
94
S
33
G
114
Posts: 5,359
Reputation: 73,779

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests