Skip to content
Permalink
Browse files
Update README.md
  • Loading branch information
ab8809 committed Jan 13, 2020
1 parent 09398bb commit c1b57bde6dcda3e34fdd1ae115395cd044c5cd00
Showing 1 changed file with 2 additions and 0 deletions.
@@ -286,3 +286,5 @@ Make sure to read the lecture slides again about these.
* Once forces are present that rotate the object in your code, you will notice that your the relative positions of the forces are not working as expected. For example, a relative force on the X axis will still move the object on the X axis even when the object is rotated 90 degrees. _Ask me for a demo of this in my code!_
* This is because the force positions are in body space while they really should be in world space so that when the objet rotates, the linear force created does as well.
* To fix this, you will have to rotate the total linear force by the orientation at the end of the _CalculateForces_ function. Look into GLM functions that will allow you to do this or code your own _Rotate_ function that takes in the orientation and total linear force and rotates it via a rotation matrix. (Hint: The x and y values can be hardcoded with the rotation matrix maths.)
* Try different shapes of rigidbodies and alter the inertia and drawing code for them. How do they differ in terms of movement?
* Hardcoding force positions and values will increase the amount of similar code written. Perhaps you could use a _vector_ to hold forces and use _for_ loops to calculate final forces and updating? These values would have to be placed in a _struct_ first for the _vector_ to hold the information.

0 comments on commit c1b57bd

Please sign in to comment.