How to calculate velocity of a given point on an object given the object's speed of rotation?

Hello there,

I am attempting to set up a kind of sword or baseball bat where the player presses a button to swing. Essentially, I want to instantiate an object that will rotate in an arc for the swinging motion. I have the object parented to an invisible Game Object so that I can rotate it from a different pivot than the center.

What I would like to do is, when the “bat” hits something, calculate the velocity of the point of impact so that I can impart that force to the object the bat hit. Essentially a little physics system. I’m not using the standard Unity physics setup because all my collisions are done with Raycasting right now and I’d like to avoid using rigidbodies or such because Unity’s system is a mess. I just need the math for how to calculate the speed of a given point (because direction will be the normal of the face) given it’s distance from the pivot and the speed of rotation.

In other words, if I have my bat rotating around pivot point A at rate of R radians per second, how fast is point B traveling if it’s X meters away from point A?

velocity (m/s) = angular velocity (radians / s) * radius (m)

1 Like

Which is the Unity physics system. :eyes:

Ouch. Seems to work really well for many thousands of other devs. Maybe there’s something you’re not doing right or something where some feedback might help. I’m not a 3D physics dev but I am happy to pass on feedback to the appropriate devs if it’d help.

1 Like

Thanks a bunch! Appreciate the help.

1 Like