![]() This is known as Terminal Velocity.Īngular Damping is the same idea, except applied to rotation. It grows stronger as your Actor moves more quickly to the point where the Damping is so strong that the Actor is unable to move any faster. Linear Damping is like wind or air resistance. It's a form of resistance against motion or rotation that varies depending on how quickly the Actor is moving or rotating. Damping Tabĭamping is a difficult topic to visualize. Terrain/Tiles have friction and bounciness of values of 1, so they have no net effect whichever way. This works out well for actors that have a friction of bounciness of 0 - as you'd expect, that negates everything and causes an effective friction/bounciness value of 0 too. For example, if two actors have a friction of 0.5, their effective friction becomes 0.25. How Friction / Bounciness Workįriction and Bounciness multiply the values of the two colliding Actors to come up with the effective Friction or Bounciness. The one with bounciness = 1 bounces back to the same height. Setting bounciness to a value of 1.0 means an actor will bounce back to the same height it fell from, whereas a value of 0.0 means it won’t bounce at all.ĭemo Note: Demo Note: In this demo, the balls bounce differently depending on their bounciness. Observe that one actor stops moving quickly (high friction) and the other keeps moving, as if he were on ice. Low-friction surfaces could include ice and glass.ĭemo Note: In this demo, press left/right and lift your key off. In real-life high friction surfaces would include dirt and sandpaper. A low, or zero, friction will cause the Actor to glide far or never slow down at all. A high friction will cause an Actor to slow down quicker when sliding. ![]() Materialįriction determines the "roughness" of the Actor's surface. Materials are preset values that use different combinations of Friction and Bounciness to simulate the material listed. Note: Angular mass is only relevant if the Actor is set to "Can Rotate" Material Tab Preset Materials As such, the higher the number, the slower an actor will rotate when subjected to rotational forces (twisting). Angular MassĪngular mass determines an actors resistance to rotational forces. Tip: Setting a very high mass can roughly simulate infinite mass / cannot be pushed, without the side-effects of that mode. How much your actor "weighs." The "heavier" you make an actor, the harder it will be for other objects to move it. This is not how gravity works in real life but is a simple approximation by Box2D to simulate it. The higher the Actor's mass, the slower it will fall. Note: The apparent "strength" of gravity is affected by an Actor's mass. You can set an Actor to obey or ignore gravity. Gravity does not necessarily have to point downwards. Gravity can be set to any direction and magnitude (strength) via the Physics page of a Scene. ![]() Gravity is a constant force that affects all bodies within a scene. Note: Setting the direction (angle) of an actor can still be done, regardless of this setting. Rotation happens either naturally through physics, setting the turning speed or twisting it with some force. ![]() Can Rotate?ĭetermines whether or not your actor can rotate. A clever way to simulate "Cannot Be Pushed" without its sideeffects is to assign a very high mass to an Actor. In Box2D speak, it's known as a Kinematic body. Gotcha: A "Cannot Be Pushed" actor will not collide with tiles. Normal: The Actor can move on its own and be moved by other Actors.Cannot Be Pushed: The actor can move but cannot be moved by another actor.Cannot Move: The actor cannot move or be moved, thus, becoming stationary.They are the most important!ĭetermines whether the Actor can move or not. If you're skimming or are a first timer, read through these sections and skip the others for now. Note: The rest of this article is a reference guide for an actor's Physics page. How realistic? Try out the following demo. What's the benefit? You get realistic and accurate collisions for free, and Actors generally behave like real-world objects. Stencyl uses an industry-standard physics engine ( Box2D) into all its games.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |