[BEHAVIOR] Chipmunk Physics

Post your completed addons to share with the community

Post » Thu Mar 19, 2015 3:20 pm

Hi,

I export capx and get error
Uncaught ReferenceError: cp is not defined

and black screen while runtime

I am using the latest version.

Edit: with minify
B
110
S
28
G
280
Posts: 4,488
Reputation: 156,568

Post » Fri Mar 20, 2015 8:50 am

May I ask why "sleep" is measured by time, i.e. all physics instances will sleep at the same time no matter the current speed is.

Here is a sleep demo of p2.js engine, These instances look not sleeping at the same time.
B
110
S
28
G
280
Posts: 4,488
Reputation: 156,568

Post » Fri Mar 20, 2015 11:41 am

The instances only sleep when they come to rest. The Sleep threshhold determines how long they must be at rest before they Sleep.
B
51
S
16
G
9
Posts: 1,098
Reputation: 11,252

Post » Fri Mar 20, 2015 12:29 pm

RattyRat wrote:One thing I cannot seem to find though, and I`m sure I must be missing something obvious, is the ability to 'weld' objects together


Rojo mentioned this a couple of pages back:

According to the chipmunk forums the way to join two objects together is with two joints. A pivot and a gear joint. I apologize fo the seeminly complicated formula used for the phase of the gear joint. It's the signed angle difference between the two object angles. angle(0,0,cos(a-b),sin(a-b))


& this is the capx he posted: download/file.php?id=12476
B
27
S
12
G
1
Posts: 157
Reputation: 3,359

Post » Fri Mar 20, 2015 2:35 pm

@spongehammer

Thanks, I saw it in my testing.
B
110
S
28
G
280
Posts: 4,488
Reputation: 156,568

Post » Fri Mar 20, 2015 6:41 pm

@rexrainbow
I haven't looked into getting it working with the minifier as of yet.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Mon Mar 23, 2015 4:12 pm

Thanks mattb, I did scan through the 25 (!) pages but nevertheless managed to miss that.
B
17
S
4
Posts: 35
Reputation: 2,408

Post » Thu Mar 26, 2015 2:46 am

Hello friends , I'm making a game of a football player you have to master the ball and crash the coins up with her , driving the ball with a leap and giving the correct angle for the ball collides with the coin , to earn points .
Accomplish this with the " Physic behaivor " but when exporting Android game run with XDK considerably slower.
As I read "Chipmunk Physics
" Should work better and faster.
Try setting the game but I can not drive the ball high enough to collide with coins .
As would be the right program to achieve that effect ?

Herewith the CAPX .

https://dl.dropboxusercontent.com/u/19024090/Soccer_physics.capx

If I could guide and help will be very grateful .

Greetings from Chile !

pd: my bad English is thanks to google translator
B
43
S
12
G
3
Posts: 111
Reputation: 4,413

Post » Thu Mar 26, 2015 6:10 am

Is there a way I can allow chipmunk to continue in spite of the global timescale being set to 0? I'm trying to use physics to get a neat effect on my menus. I'd tried setting the individual timescales, but the chipmunk sprites remain frozen.
B
14
S
5
G
1
Posts: 189
Reputation: 1,536

Post » Thu Mar 26, 2015 5:05 pm

@isasaurio
I suppose you could just give the ball an elasticity greater than 1 to make it bounce more.

@bladedpenguin
Only the main timescale works. Individual timescales aren't used because all the chipmunk objects need to have the same timescale for the simulation.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests