HomeAll
Store›MorganeParis›Gravity Drift On Grab Script
Gravity Drift On Grab Script

Gravity Drift On Grab Script

49
Log in to like
Item name
Gravity Drift On Grab Script
Category
Scripts
Min. resale price
50
Listed
10/8/2025

Description

Version 1.8.1 Makes a prop gently float upward when first grabbed, by ramping its gravity to a negative value. When released, it keeps its position and its motion, and its rotation smoothly realigns to the world axes. An optional ceiling and XYZ bounds freeze the object in the air (and can hide it) before it drifts out of the scene. No scripting skills needed. New in 1.8: a grab during the realign stops it at once (the object never stays out of physics in a hand), a frozen object never comes back to physics, the object returns to its own motion type after a realign, far fewer physics writes, warnings for settings that would freeze the object at the first grab or keep it visible when frozen, settings grouped by category and a Debug Logging switch. Fully standalone. ________________________________________ Key Features Gravity • Gravity factor blends from Start to Target over Ramp Seconds (negative = the object rises) • One-time Kick Up Speed when gravity flips, Max Up Speed cap • Use Z As Up for Z-up setups Ceiling and bounds • Freeze on an absolute altitude, or at a height above the start • World-aligned XYZ box, absolute or relative to the start, with a safety margin • Hide the object once frozen Release • Smooth SLERP realign of the rotation over Rotate Seconds, with ease in-out and a short hold • Align to the world axes, or keep the current rotation • A grab during the realign stops it cleanly (1.8) ________________________________________ Technical Details • 28 settings in six groups: Gravity, Ceiling, Bounds, Release, Object, Debug • Requires a Dynamic physics object; Ensure Can Grab makes it grabbable at start • Gravity factor written only while it changes; orientation written only when it changes (1.8) • Warnings in the script console: no RigidBody, not Dynamic, ceiling at or below the start, start outside the bounds, Hide on without a scriptable mesh, non-grabbable object • Optional Debug Logging: startup summary (Up vector, motion type, ceiling, bounds), first grab, end of the ramp, realign start and end, freeze reason • Guarded physics writes: a failed step never blocks the next ones ________________________________________ Example Uses • Helium balloons at a party or a wedding • Lanterns released into the night sky • Floating orbs, bubbles, paper planes • A ball that "escapes" upward in a game ________________________________________ Full documentation online: https://mpp-mainstore.com/sansar/GravityDriftOnGrab/ ________________________________________ Updating from 1.7 • Your settings are kept when you update the script: the 27 settings keep their values, only their labels change and move into groups. Take a screenshot of the Build panel first, update one object and check it before doing the others. • One new setting at its default: Debug Logging (off). • What changes: a grab during the realign gives the object its physics back at once, a frozen object never comes back to physics, the object returns to its own motion type after a realign (1.7 always made it Dynamic), only scriptable meshes are hidden. Changelog — Version 1.8.1 • Version number only. Changelog — Version 1.8.0 • The realign can be cancelled by a grab, a new release or a freeze; a grab gives the object its motion type back at once. • The realign ends on the motion type read at start, writes the drift gravity factor again, and gives the release velocity back to a Dynamic object only. • Gravity factor written only during the ramp; orientation written only when it changes. • Guarded physics writes, freeze step by step, hide limited to scriptable meshes. • Warnings at start for settings that freeze the object at the first grab or cannot hide it. • Settings grouped by category, Debug Logging switch. Changelog — Version 1.7 • Tidied version of the 1.5 and 1.6 scripts: gravity ramp on the first grab, kick and speed cap, ceiling, XYZ bounds with margin, hide on freeze, realign on release. Thanks to Nicci for her excellent suggestions and help. ________________________________________ Enjoy and Keep Good Vibes. Hugs from Morgane. ________________________________________