From 2ab6b6cfe81505b029f2da397cef0bb58989444f Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Thu, 17 Jun 2021 21:32:57 -0400 Subject: (mkosarek) Beginning to explain rigidbody physics in a reasonable way --- 2d/rigidbody/rigidbody_1/snippet1.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 2d/rigidbody/rigidbody_1/snippet1.cpp (limited to '2d/rigidbody/rigidbody_1/snippet1.cpp') diff --git a/2d/rigidbody/rigidbody_1/snippet1.cpp b/2d/rigidbody/rigidbody_1/snippet1.cpp new file mode 100644 index 0000000..77a81b7 --- /dev/null +++ b/2d/rigidbody/rigidbody_1/snippet1.cpp @@ -0,0 +1,8 @@ + +struct Rigidbody { + Vector2 force = { 0, 0 }; + Vector2 acceleration = { 0, 0 }; + Vector2 velocity = { 0, 0 }; + Vector2 position = { 0, 0 }; + float32 mass = 1.f; +}; -- cgit v1.2.1