So this is the problem that I need to solve:
The grey box is a RigidBody2d box collider, the green point is the center of mass and the red arrow is the force applied.
What I want to calculate:
-The amount of torque that this will give the object.
The variables that I know are:
-The mass of the RigidBody2d
-The amount of force applied
-The distance from the center of mass to the point where force is applied:
-And that the force is always applied at a 90 degree angle to the center of mass.
first off, RigidBody2d should have the exact function you need to do this already you simply need to call it in code.
Ironically I wrote this huge post for another thread that covered this exact topic… for specifically figuring this out without using Rigidbodies… and then I completely didn’t post it (you’d be surprised at my level of ADD cause this happens a lot). luckily the post was still in my browser’s cache
link to the thread with my brand new post: Manually calculate angular velocity of gameobject - Unity Engine - Unity Discussions
JoshuaMcKenzie:
first off, RigidBody2d should have the exact function you need to do this already you simply need to call it in code.
Ironically I wrote this huge post for another thread that covered this exact topic… for specifically figuring this out without using Rigidbodies… and then I completely didn’t post it (you’d be surprised at my level of ADD cause this happens a lot). luckily the post was still in my browser’s cache
link to the thread with my brand new post: https://forum.unity3d.com/threads/manually-calculate-angular-velocity-of-gameobject.289462/#post-2951543
Well I “think” I figured it out, but I didn’t test it in game yet so.