# Need help with my 1st Project

Get help using Construct 2

### » Fri Jan 20, 2012 6:04 pm

Hi,

I'm working on my first project and I have a doubt.
How do I keep the ball in the square without falling?
I saw several tutorials and did not find a way to work.

Could anyone help me?

http://dl.dropbox.com/u/43945453/1stProject.capx

Sorry by my English.

thanks
B
52
S
7
G
6
Posts: 14
Reputation: 5,620

### » Fri Jan 20, 2012 6:17 pm

use physics behaviors to ball and square
square set immovable 'yes'
B
119
S
32
G
53
Posts: 1,897
Reputation: 39,571

### » Fri Jan 20, 2012 6:25 pm

[QUOTE=delgado] use physics behaviors to ball and square
square set immovable 'yes'[/QUOTE]

With these parameters the ball is outside the square and it must stay within the square.

tyvm
B
52
S
7
G
6
Posts: 14
Reputation: 5,620

### » Fri Jan 20, 2012 6:29 pm

yeah because polygons fill all box i think easiest way is to create 4 sides of box
B
119
S
32
G
53
Posts: 1,897
Reputation: 39,571

### » Fri Jan 20, 2012 6:31 pm

or check this http://dl.dropbox.com/u/44710358/ball.capx
B
119
S
32
G
53
Posts: 1,897
Reputation: 39,571

### » Fri Jan 20, 2012 6:40 pm

WOW thanks...

You set the collision polygon

tyvm
B
52
S
7
G
6
Posts: 14
Reputation: 5,620

### » Fri Jan 20, 2012 10:36 pm

This works with a square sprite ... but... if the sprite is round ... how to put the ball inside the round sprite?

B
52
S
7
G
6
Posts: 14
Reputation: 5,620

### » Fri Jan 20, 2012 10:53 pm

If the round sprite is transparent in the middle, like the square... it should work the same. Although i'm not sure if there's a limit to how many sides the collision polygon can have
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

### » Sat Jan 21, 2012 1:30 am

[QUOTE=keepee]... i'm not sure if there's a limit to how many sides the collision polygon can have[/QUOTE]
Too many sides (say, > 8) put too heavy a burden on the engine (each point on each polygon has to be compared, and coming from JavaScript, that's a pretty processor-intensive process).

The bottom line: limit the number of sides to the minimum that give you the results you need.
B
109
S
21
G
14
Posts: 549
Reputation: 21,250

### » Sat Jan 21, 2012 1:59 am

I've looked at 77 pages on the forum "How do I..." and could not solve my problem.
I am now looking to see if I think Canvas something to help me.
I need to put that ball in the maze ... I need a mask to the sprite.

This is my (secret) 1st Project

http://dl.dropbox.com/u/43945453/myproj.capx
B
52
S
7
G
6
Posts: 14
Reputation: 5,620

Next