Physics

Get help using Construct 2

Post » Wed Jul 11, 2012 2:22 pm

How do I make a box that has physics not fall through the floor?

I read some tutorials since the block with physics keeps falling through the floor so:

I tried making the floor with physics with immovable option on but the floor kept falling.

I tried making the box with physics immovable and that stayed still in the air.

Here is the capx: https://dl.dropbox.com/u/75406771/blackphy.capx
(I am trying to make the box in the air at the start with the 2 white lines have physics)
Hobby app website: http://www.skymillapps.com/
B
10
S
2
Posts: 105
Reputation: 2,114

Post » Wed Jul 11, 2012 2:28 pm

You need to have the physics behaviour on your floor as well. Otherwise the box's phyics can't interact with the floor.

https://dl.dropbox.com/u/22615804/physics.capxinkBot2012-07-11 14:28:44
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Wed Jul 11, 2012 3:02 pm

I did make the physics behaviour on the floor as well. Tried immovable and not immovable but the floor then started to fall as well.
Hobby app website: http://www.skymillapps.com/
B
10
S
2
Posts: 105
Reputation: 2,114

Post » Wed Jul 11, 2012 3:17 pm

Does the floor fall for you in the capx I posted? It works fine for me.
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Wed Jul 11, 2012 4:00 pm

managed to fix it, nvm
Hobby app website: http://www.skymillapps.com/
B
10
S
2
Posts: 105
Reputation: 2,114

Post » Wed Jul 11, 2012 4:08 pm

@t33hp - did you have a look at the tutorials section? Your question is covered by the Physics Basics tutorial:

[quote]Making the scenery
You don't want your game's floor to fall away off the bottom of the screen with gravity too! ... Most of the time in our games we want to simulate the scenery being rock solid: not falling away with gravity, and not being pushed a little bit back by things hitting it. Set the physics object's Immovable property to Yes to simulate this.[/quote]
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Thu Jul 12, 2012 5:03 am

Yes I have, the thing was when you add a behaviour to one block it sets it to all of the same blocks. So I thought that if I make one immovable it will make it all immovable, but that was not the case; all I had to do was select all of them.
All good.
Hobby app website: http://www.skymillapps.com/
B
10
S
2
Posts: 105
Reputation: 2,114

Post » Thu Jul 12, 2012 1:53 pm

When you add a behavior to an object, all instances get that behavior. If you change a property, that only occurs for that one instance.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400


Return to How do I....?

Who is online

Users browsing this forum: anty21ro, Magistross, PavleNikolic and 20 guests