3/14/2023 0 Comments Tutorial 6 physics 101It's harder work to pull the brick along on concrete than on ice. No friction is like skating on ice, and high friction is like dragging a brick along concrete. If you have a concrete block, you'd want to give it a much higher density than a block of foam! Frictionįriction affects how much the object is slowed down by sliding against another object. So a really huge object has a much bigger mass than a small object, even if their densities are the same. Objects with a large mass are still harder to move in zero gravity.) Your object's mass is determined by its density multiplied by the area of its collision shape. (Note that "weight" isn't the exactly correct term - weight is dependent on gravity, and objects still have mass in zero gravity. Mass defines how hard the object is to move. Densityĭensity is used to determine the object's mass. For example, in a platform game, you probably don't want your player to trip over and fall on their face every time they try to run. This might be useful if you want to control the angle of the player yourself. If enabled, the object will never rotate even if struck at a glancing angle. ![]() Instead it'll either use a rectangle around the object (bounding box), or a circle which is useful for rolling objects like balls. If set to either bounding box or circle, the collision polygon from the image editor is ignored. Be careful not to use too many points, or it could slow down the game. If you open up the image editor and click the collision polygon tool, you can change the bits of it that will collide. This sets the collision shape of the object. Let's briefly go over the other properties in the physics behavior: Collision mask Physics objects will pass right through 'Solid' objects, unless you give them the Physics behavior and set them to immovable. They ignore anything which does not also have the physics behavior. Adding the Solid behavior to the floor has no effect on physics objects. Note: Physics objects only interact with other physics objects. If you set gravity to 0 on one object, gravity is turned off for all objects. Note: gravity applies to the whole "world". for a space game, you can use the Set gravity action on any physics object. The default gravity is 10 (remember, the Y axis increases downwards in Construct). Gravityīy default, gravity is present on physics objects, which accelerates all objects downwards. We'll call any object with the Physics behavior added a "physics object". Click Add new behavior and from the dialog pick the Physics behavior. ![]() Select an object you want to add Physics to. The descriptions here will probably make a lot more sense if you've seen it in action first. Lots of physics examples come with Construct! Search for Physics in the Start Page to find them. Interested in some of the theory? You might want to read Wikipedia's article on Newton's laws of motion. I'll still explain the basics in brief in case you haven't learnt the concepts before. ![]() If you ever took a Physics class in school, you'll find some of the things you learned applicable to Construct's physics. Physics can make your games really fun and engaging! Here's an overview of how you can get Physics to work in your game. Click here to open a demo to see the kind of physics it simulates. This allows you to have objects moving with real-world physics. Construct includes the Physics behavior, powered by the Box2D physics engine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |