Skip to content

Latest commit

 

History

History
239 lines (184 loc) · 9.22 KB

week5.asciidoc

File metadata and controls

239 lines (184 loc) · 9.22 KB

Nature of Code: Week 5

What is Box2D?

Confused by this video?

Post any questions or comments here.

What are the core elements of the Box2D world?

Confused by this video?

Post any questions or comments here.

Box2D coordinate system and Box2D vectors

Confused by this video?

Post any questions or comments here.

Task Function
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)

A first Box2D sketch

Complex Shapes in Box2D

Box2D Joints

Confused by this video?

Post any questions or comments here.

Applying Forces in Box2D

Confused by this video?

Post any questions or comments here.

Triggering Collision Events in Box2D

Confused by this video?

Post any questions or comments here.

Homework Week 5

For this week, you should begin working on your midterm project. As an experiment, I’d like to try seeding a little online discussion about midterm ideas. Please visit the following link and make a post and comment on other posts:

If you are struggling for ideas, here are some links to midterm projects from last year: