This repository has been archived by the owner on Jan 14, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm new at both GitHub and mobile development, so bear with me.
I believe I'm sending you a "pull request", which is, to my understanding, a request for you to look at my code changes and accept or reject them. I am trying to understand the Physics World that was created in the GoneBananas game. My understanding that is that CCPhysicsSprite is created to join the Physics Box2D world with the regular CocosSharp objects that we want to see. I noticed there were some rotation calculations that were done. But, I don't think you need them. I took everything out of the game except the physics stuff. I also changed the balls to squares, so I could see the effect of what I did. And, setting the b2Body's Angle, AngularVelocity, and Angular damping and using the code I wrote seems to do the trick for accurate display. I'm pretty new at all this, so I may be missing something. (You'll need to add the constant I used somewhere as well, so the code I wrote can't just be added as is.)
public const float DEGTORAD = 0.0174532925199432957f;
public const float RADTODEG = 57.295779513082320876f;