1
\$\begingroup\$

Given a Physics body with all his properties i want to break the body into two or multiple parts that keep the original velocities.

for linear velocity this should be original velocity + centrifugal force based on original center of mass to new center of mass. however with angular velocity this gets more tricky. i could sample multiple linear velocity points as mentioned above and then try to resolve the angular velocity from that but that seems like the brute force way.

\$\endgroup\$
4
  • \$\begingroup\$ Are you trying to implement an exploding object of some sort? I can't figure why you need the centrifugal force (which is due to what?) as well as angular velocities - keeping an object's parts together can be better achieved with Transform hierarchy, due to physics engine limitations. Can you show a use case for your problem and what you have tried so far? \$\endgroup\$ – liggiorgio May 31 at 12:54
  • \$\begingroup\$ exploding / slicing yes. example: if you have a spinning disc and cut it in half the 2 object should fly off in opposite directions as well as keep some of the angular velocity. it has nothing to do with hierarchy really \$\endgroup\$ – HellGate May 31 at 13:09
  • \$\begingroup\$ Can you tell us anything about the shapes of the body and the parts you're cutting? If you want an analytical solution, rather than one based on sampling many points, then those are usually specific to primitive shapes. \$\endgroup\$ – DMGregory Jun 7 at 11:52
  • \$\begingroup\$ mhh they are mostly generic mesh shapes / colliders (eg: a box into multiple planks as present in so many games like hl2). they are most likely convex but i imagine it wouldn't matter if they are concave as long as the volume, center of mass, inertia variables are correct. maybe i'm missing something but i can't see the relation of it to the shape of the object but rather these variables resulting from the shape \$\endgroup\$ – HellGate Jun 7 at 12:39
1
\$\begingroup\$

I intended this as a comment, but got too long.

In real world angular velocity 'kinda does not exist' as such. Spinning is linear speed which is constantly changing. Lets take scenario of ball spinning around point in space and attached to that point by the rope. If you cut the rope, ball will travel in straight path! In spinning disk scenario all parts of disk want to travel in straight path but tension force pushes them toward the axis, resulting in 'spinning'. But if the disk is shattered - all pieces should travel in straight line, with no angular speed.

But... they don't. Depending of size and shape of broken piece - it will have some angular speed. This happens because those points traveling closer to axis have slower speed, points traveling further from axis - higher, this result in tension between them forcing part to spin. The higher difference in speeds between different points on broken piece - the bigger the angular speed.

cd

In the image part 1 will have small angular speed. Part 2 - much bigger. 3 - will have big angular speed.

Slo Mo guys have YouTube video of spinning shattering disk - you will see that broken parts are traveling in straight line, and angular speeds depend of size/shape of broken chunk..

how to calculate angular/linear speeds of broken chunks in Unity.. This approximation could work - just before breaking take angular velocity of object, take two points of (will-be) broken chunk - nearest to axis (let's call it n) and furthest one f. Find out their speeds (Vector3). Now find the difference between n and f speed vectors and according to this difference give this chunk angular velocity. Also 'draw' tangent vector from the middle of chunk - this will be the movement direction of it.

cd2

\$\endgroup\$
1
  • \$\begingroup\$ yea that basically what i ment with "i could sample multiple linear velocity points as mentioned above and then try to resolve the angular velocity from that but that seems like the brute force way." it gets tricky in 3d and math usually has better answers \$\endgroup\$ – HellGate Jun 1 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.