tubeshowcaseโ—1,059,698 videosโ™ก My collection 0
โ† Learn to Code

Learn to Code15:38

5.5: Adding Box2D to Processing Sketch Part 2 - The Nature of Code

The Coding Train โ†—

From the creator

The basics of adding Box2D to a Processing sketch, continued. Code: https://thecodingtrain.com/tracks/physics-libraries/physics-libraries/box2d/5-adding-to-processing-sketch-2 ๐Ÿ’ป Code Example: https://github.com/nature-of-code/noc-examples-processing/blob/master/chp05_physicslibraries/box2d/NOC_5_2_Boxes/Boundary.pde ๐ŸŽฅ Previous: https://youtu.be/lmYLmcFuj2s ๐ŸŽฅ Next: https://youtu.be/oBcv_P_YDrw References: ๐Ÿ”— Nature of Code: https://natureofcode.com ๐Ÿ”— Nature of Code Processing Examples: https://github.com/nature-of-code/noc-examples-processing/tree/master/chp05_physicslibraries/box2d/NOC_5_5_MultiShapes ๐Ÿ”— Box2D: https://box2d.org ๐Ÿ”— JBox2d: https://github.com/jbox2d/jbox2d Timestamps: 0:00 Introduction 1:16 Create a body 3:15 Look at the code example 4:25 Step through time in draw() 5:48 Look at the code for the Body 6:52 Remember to convert from pixels to world coordinates! 9:32 Use a fixture to attach the shape to the body 10:39 Putting it all together 11:28 Ask Box2D where is the body? 12:32 Ask for the angle 13:20 Rotation is flipped in the Box2D world 14:26 Going deeper by looking at the documentation 15:11 Outro Editing by Mathieu Blanchette Animations by Jason Heglund Music from Epidemic Sound ๐Ÿš‚ Website: https://thecodingtrain.com/ ๐Ÿ‘พ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide ๐Ÿšฉ Suggest Topics: https://github.com/CodingTrain/Suggestion-Box ๐Ÿ’ก GitHub: https://github.com/CodingTrain ๐Ÿ’ฌ Discord: https://thecodingtrain.com/discord ๐Ÿ’– Memb

Published 2015-08-06 ยท Watch on YouTube โ†—
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code