Since my Pinball example seems to be from quite some interesst, I will try to compile this tutorial for everyone trying to use the physic behavior for similar games.
This Tutorial was compiled for an earlier version of Construct. If you want to take a closer look at it, you need to install the deprecated plug-in -> PLUGIN
The complete CAPX
holds all the artwork needed.
The most important parts of a Pinball
This is easy. Take a Sprite, call it Ball and add the physics-b
The collision mask is here set to circle
The Ball has to stay inside the Layout and also bounce of the walls that you'll place on the scene. Therefor you need different instances of the same sprite.
I've used a simple square-sprite (dark blue) with physics-behavior and the following properties:
Collision Mask: use collision polygon
Please note, that the boundry is set to "immovable"
This is now the first active element. So it get's a little more complicated. Again, first of all you need a sprite. Set the collision mask to: use collision polygon
Make sure, that the sprite has the physics-behavior added.
Since the paddle has to be moveable and to transport impulse, we need to imagepoints - one as pivotpoint, the other to apply force and impulse to.
Place the paddle whereever you like, but make sure that it is "moveable"
Now, if you would place all three items on a layout and would run it, the ball and the flipper would fall to the "ground", just the boundry stays in place.
We want the paddle to stick to one position, so we need to "fix" it. This is done by calling Create limited revolution joint an join the pivotpoint to the boundry. Do this within an On Start of Layout event
If you run the project now, the paddles should stay in place.