Skip to content

[Smoothie] Physical Soft Body

Sh1zok edited this page Apr 25, 2026 · 1 revision

Module purpose

This module allows you to add physics to soft body parts

Note

You call this function for each physical soft body, so if you have two of them you will call this function twice(one for each soft body)

Intallation process

To add some physics to your soft body parts, do the following:

  1. Initialize Smoothie and store it in a variable.
    For example: local smoothie = require("Smoothie")

  2. Copy the path to the model part that is the soft body.
    For example: models.model.root.Body.Breast

  3. Use newPhysicalBody()
    For example: local rigbtBreast = smoothie:newPhysicalBody(models.model.root.Body.Breast)

Final example:

local smoothie = require("Smoothie")
local rigbtBreast = smoothie:newPhysicalBody(models.model.root.Body.Breast)

Settings:

setBouncy() Aliases: bouncy()

The bigger the number, the more the soft body part bounces

setBouncy()

Parameters:

Name Type Description Default
value number Soft body bouncy 0.5

Returns:

Type Description
table Returns self for chaining

Example:

rigbtBreast:setBouncy(1)

setSpeed() Aliases: speed()

Soft body part rotation speed

setSpeed()

Parameters:

Name Type Description Default
value number Soft body part rotation speed 150

Returns:

Type Description
table Returns self for chaining

Example:

rigbtBreast:setSpeed(300)

setTopLimit() Aliases: topLimit()

The maximum angle at which the body part can rotate upward

setTopLimit()

Parameters:

Name Type Description Default
value number The maximum angle at which the body part can rotate upward 45

Returns:

Type Description
table Returns self for chaining

Example:

rigbtBreast:setTopLimit(35)

setBottomLimit() Aliases: bottomLimit()

The maximum angle at which the body part can rotate downwards

setBottomLimit()

Parameters:

Name Type Description Default
value number The maximum angle at which the body part can rotate downwards 45

Returns:

Type Description
table Returns self for chaining

Example:

rigbtBreast:setBottomLimit(20)

setLeftLimit() Aliases: leftLimit()

The maximum angle at which the body part can turn to the left

setLeftLimit()

Parameters:

Name Type Description Default
value number The maximum angle at which the body part can turn to the left 15

Returns:

Type Description
table Returns self for chaining

Example:

rigbtBreast:setLeftLimit(25)

setRightLimit() Aliases: rightLimit()

The maximum angle at which the body part can turn to the right

setRightLimit()

Parameters:

Name Type Description Default
value number The maximum angle at which the body part can turn to the right 15

Returns:

Type Description
table Returns self for chaining

Example:

rigbtBreast:setRightLimit(15)

Clone this wiki locally