← Yop2D

Questions about physics

Beginner guide · no code

Français · English · Español · Deutsch · Italiano · Português · Русский · 中文 · 日本語 · العربية

ℹ️ For Yop2D Next, the new 2D + 3D version of Yop2D (coming soon). Button and node names are those of Yop2D Next.

🔍 How do I…? All short recipes, with a search

Short answers to questions about realistic physics in Yop2D Next: objects that fall, roll, bounce and hold on to each other. The names in bold are the ones you see on the screen.

👉 Almost everything here needs the Realistic physics behaviour (⚙ Object behavior button in the Inspector). To choose the right behaviour: Which behaviour to choose?.

How do I make a rope or a chain?

  1. The hanging object (a lantern, a crate): Realistic physics, type Normal (falls, can be pushed). The hook: a small object at the top; it can stay without physics, it won't move.
  2. On Start → Link two objects: Object A = the lantern, Object B = the hook, Kind of link “Rope”, and “Show the rope” set to Yes to see it.
  3. “The finger can cut it” set to Yes: the player cuts the rope by sliding a finger across it, and the When a rope is cut event fires. To cut it with a node: Cut a link.
  4. A chain that bends: several Realistic physics links, each one joined to the one before by a “Hinge” link.
  5. In 3D: Attach two objects (3D), with Ball joint (pendulum, chain).

How do I make a swinging door or a drawbridge?

  1. The door (or the bridge plank): Realistic physics, type Normal (falls, can be pushed).
  2. On Start → Link two objects: Object A = the door, Object B left empty (it hangs on the scenery), Kind of link “Hinge”, point of object A Left (the hinge side; Bottom for a drawbridge). Give the link a name, for example bridge.
  3. Lower limit and Upper limit, in degrees: how far it can turn (for example 0 and 90, a quarter turn).
  4. To raise the bridge: Adjust a link (link bridge, Motor: speed 45; 0 to stop it). A door seen from above must not fall: Gravity for this object = None (floats).
  5. In 3D: Attach two objects (3D), with Vertical hinge (door) or Lying hinge (drawbridge, swing). The object needs the Physics object (falls, rolls, bounces) behaviour.

How do I make a car or a ragdoll?

  1. Tap Object → Tools → Create a body, and give it a name (for example car).
  2. Add the parts with the + button (an image or a shape) and place them like on a drawing: the body and two wheels, or the head, chest, arms and legs of a ragdoll.
  3. Choose Link, tap two parts, then set the Kind of link on the right. Car: Wheel, with Motor and its Motor speed. Ragdoll: a Hinge at each elbow and each knee.
  4. Tap Try it to watch it fall and roll, then Place in the scene. During the game, the Place a body (ragdoll, car…) node places another one.
  5. To start or stop the motor in the game: Adjust a link, with the name written on the Name for the nodes: line. The player builds the vehicle? Assemble the parts node.

How do I throw an object in an arc (like Angry Birds)?

  1. The bird and the crates: Realistic physics, type Normal (falls, can be pushed). The ground: Ground / wall.
  2. A Throw button (Button with text): On Object Click (Throw) → Launch (angle and speed) (Object bird, Angle -45, Starting speed 1500).
  3. Gravity does the rest: the bird flies in a curve and knocks the crates over. Angle 0 = to the right, -90 = up. More speed = farther.
  4. So that the player can move objects with a finger: Finger held down → Grab with the finger (physics).
  5. In 3D: Throw in an arc (3D) makes the object land right on a target.

How do I make an explosion that pushes the crates?

How do I draw a line with my finger that becomes an object?

How do I set the gravity of the whole level (on the Moon)?

What are Material, Weight, Bounce and Grip for?

What is “Very fast object (never goes through a thin wall)” for?

👉 Nothing moves? Check the type: Fixed (ground, wall, support) never moves, Normal (falls, can be pushed) falls and can be pushed. See also My game doesn't work.