Book Image

Learning Construct 2

By : Aryadi Subagio
Book Image

Learning Construct 2

By: Aryadi Subagio

Overview of this book

Table of Contents (17 chapters)
Learning Construct 2
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Learning about physics


We will now discuss physics in Construct 2. To apply physics to an object, we only need to add a Physics behavior to it. All objects with the Physics behavior are referred to as physics objects. Physics is a complex subject, so I will only explain it briefly here to cover what you need to know to start experimenting with it.

If you still remember your physics class back in school, then this will be really useful here because the concepts are the same. We will create a third layout to demonstrate our physics object, so create a new layout and make it look like this:

As you can see, we used two solid objects that we used to build up our levels earlier. However, we will add one new sprite object here called rock; the sprite for the rock object can be found under Base pack\Items. The rock doesn't do anything for now, but we'll use it as a physics object, so let's add a Physics behavior to it (the Physics behavior can be found in the movement section when you add a behavior...