This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
en:guides:beginners:physics [2018/06/27 23:48 (7 years ago)] – external edit 127.0.0.1 | en:guides:beginners:physics [2024/11/17 04:48 (5 months ago)] (current) – sausage | ||
---|---|---|---|
Line 15: | Line 15: | ||
In order for physics to act on an object, the object needs to have a body. Let's add one to our hero: | In order for physics to act on an object, the object needs to have a body. Let's add one to our hero: | ||
- | < | + | < |
[HeroObject] | [HeroObject] | ||
Graphic | Graphic | ||
Line 44: | Line 44: | ||
Run that and you'll see our hero fall right through the floor. So that's good. The physics body is working. But we need to get the platforms solid too. | Run that and you'll see our hero fall right through the floor. So that's good. The physics body is working. But we need to get the platforms solid too. | ||
- | < | + | < |
[PlatformObject] | [PlatformObject] | ||
Graphic | Graphic | ||
Line 71: | Line 71: | ||
First, set the flags on the HeroBodyPart: | First, set the flags on the HeroBodyPart: | ||
- | < | + | < |
[HeroBodyPart] | [HeroBodyPart] | ||
Type = box | Type = box | ||
Line 83: | Line 83: | ||
Now set the '' | Now set the '' | ||
- | < | + | < |
[PlatformBodyPart] | [PlatformBodyPart] | ||
Type = box | Type = box | ||
Line 99: | Line 99: | ||
You can turn on physics debug mode if you want to see the bounding boxes around the objects. Turn on the physics debug with: | You can turn on physics debug mode if you want to see the bounding boxes around the objects. Turn on the physics debug with: | ||
- | < | + | < |
[Physics] | [Physics] | ||
AllowSleep | AllowSleep |