Commit 3118ccc7 authored by Jonas Johan Solsvik's avatar Jonas Johan Solsvik 🎮
Browse files

Merge branch 'remove-tabs' into 'master'

Remove tabs from 02/main.cpp

See merge request !3
parents bdb4df18 b3d22c8f
## 02-jumping-boxes
Introducing rudimentary physics.
\ No newline at end of file
Experimenting with 2D collision detection and some simple physics.
\ No newline at end of file
......@@ -280,15 +280,15 @@ auto physicsTestCollision(
/**
* Get the four corners of the colliding rectangle
*
* [topLeft] -------------- [topRight] |--------------
* | | -->>> |
* | | |
* | | |
* | collider | -->>> | impacter
* | | |
* | | |
* | | -->>> |
* [botLeft] -------------- [botRight] |--------------
* [topLeft] -------------- [topRight] |--------------
* | | -->>> |
* | | |
* | | |
* | collider | -->>> | impacter
* | | |
* | | |
* | | -->>> |
* [botLeft] -------------- [botRight] |--------------
*
*/
const auto topLeft = sf::Vector2f{pos.x - halfSize.x, pos.y - halfSize.y};
......@@ -300,14 +300,14 @@ auto physicsTestCollision(
* Extrapolate where the colliding rectangle will be after dt
*
* -----------|
* |
* |
* | [dtTopLeft] --------------- [dtTopRight]
* | | | -->>>
* collider |--- | |
* | \ | |
* | \-->> | collider | -->>>
* | | |
* | | |
* | | | -->>>
* collider |--- | |
* | \ | |
* | \-->> | collider | -->>>
* | | |
* | | |
* -----------| | | -->>>
* [dtBotLeft] ---------------- [dtBotRight]
*/
......@@ -320,13 +320,13 @@ auto physicsTestCollision(
* Get the four corners of the impact rectangle
*
* -----| [impTopLeft] -------------- [impTopRight]
* | -->>> | |
* | | |
* | | |
* | -->>> | impacter |
* | | |
* | | |
* | -->>> | |
* | -->>> | |
* | | |
* | | |
* | -->>> | impacter |
* | | |
* | | |
* | -->>> | |
* -----| [impBotLeft] --------------- [impBotRight]
*/
const auto impPos = impactThing.shape.getPosition();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment