5.3: Box2D Coordinates and Vectors - The Nature of Code

Subscribers:
1,740,000
Published on ● Video Link: https://www.youtube.com/watch?v=iNHfAFx8ktQ



Category:
Tutorial
Duration: 12:38
27,582 views
493


This video covers the Box2D coordinate system and how to use the Vec2 class.

Read along: Read along: http://natureofcode.com/book/chapter-5-physics-libraries/#chapter05_section4

Convert location from World to Pixels
Vec2 coordWorldToPixels(Vec2 world)

Convert location from World to Pixels
Vec2 coordWorldToPixels(float worldX, float worldY)

Convert location from Pixels to World
Vec2 coordPixelsToWorld(Vec2 screen)

Convert location from Pixels to World
Vec2 coordPixelsToWorld(float pixelX, float pixelY)

Scale a dimension (such as height, width, or radius) from Pixels to World
float scalarPixelsToWorld(float val)

Scale a dimension from World to Pixels
float scalarWorldToPixels(float val)

Help us caption & translate this video!

http://amara.org/v/Qbvy/

📄 Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct







Tags:
box2d coordinates
pixel coordinates to world coordinates
box2d coordinates and vectors
box2d vectors
world coordinates box2d
box2d scale
nature of code box2d
box2d
nature of code
processing
processing.org
box2d tutorial
jbox2d
jbox2d tutorial
physics
the nature of code
processing box2d
java box2d
processing box2d tutorial
processing physics engine
processing tutorial