47:495.5: Adding Box2D to Processing Sketch Part 2 - The Nature of Code
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.





