World Championship 2025
Original Post
[REL] Momentum Visualizer

(Made for Toribash 5.7x)

MomV: Momentum Visualizer v1.0



Hey are you interested in your tori's center of mass (COM) or direction of momentum (DOM)? Well if you're into doms then this is the script for you!


Commands:
/dom : start drawing DOM
/domz : toggle record Z-azis
/domclear : clear DOM line
/com : toggle show COM
/ref : toggle floor reference lines
/ref2 : toggle extra floor reference lines


Showcase:

Fosbury flop demo by jagger700



Tricking demo by me



0-grav test by


How it works:
To find your little guy's center of mass, get each body part's mass by calculating their volume according to their shape, get their positions, then use the COM formula to get our (x,y,z). So it works with modified bodies too but if some body parts use a different density then it'll be inaccurate (get_body_info() doesn't include density?)
Attached Files
momv.lua (5.7 KB, 19 views)
Last edited by miso903; 4 Weeks Ago at 06:06 PM. Reason: swap imgur gifs cuz uk
Originally Posted by miso903 View Post
So it works with modified bodies too but if some body parts use a different density then it'll be inaccurate (get_body_info() doesn't include density?)


You could read densities from the tbm file.
If density of a body part isn't mentionend in the file, assume density = 0.25 for this body part.
That's how tbm files are read with respect to density, I believe.
Cool script!
Amazing....I love this!!! Thanks a BUNCH FOR REALLSSS!!! :DDD
Last edited by Szaszuniya; 4 Weeks Ago at 04:01 AM.
Fair for a Szaszu made relaxed for DQ'ing - MC Szas
useless mod, my brain already does this +1
-----
this is actually sick tho
Last edited by Kirito; 4 Weeks Ago at 05:12 PM. Reason: <24 hour edit/bump
[SIGPIC][/SIGPIC]
Nomad Moderated Message:
Be more straightforward with your uplifting messages or I'll fucking skin you alive.
Ive been using this script every day since you posted it and it has entirely changed how I view the game, which has realigned my entire moral framework of the physical world and made me question everything I know. Just wondering if theres plans to post a momv2 at any point?