-
Notifications
You must be signed in to change notification settings - Fork 0
[Smoothie] Eyes
Moves an eye based on the head rotation to look toward where you look
Note
You call this function for each eye, so if you have two eyes you will call this function twice(one for each eye)
To make the eyes turn on the head rotation, do the following:
-
Initialize Smoothie and store it in a variable.
For example:local smoothie = require("Smoothie") -
Copy the path to the model part that is the eye.
For example:models.model.root.Head.Eyes.RightEye -
Use
newEye()
For example:local rightEye = smoothie:newEye(models.model.root.Head.Eyes.RightEye)
Final example:
local smoothie = require("Smoothie")
local rightEye = smoothie:newEye(models.model.root.Head.Eyes.RightEye)The number of pixels that the eye model part will move when the player looks up as far as possible
setTopOffsetStrength()Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
| value | number | The number of pixels that the eye model part will move when the player looks up | 1 |
Returns:
| Type | Description |
|---|---|
| table | Returns self for chaining |
Example:
rightEye:setTopOffsetStrength(0.5)The number of pixels that the eye model part will move when the player looks down as far as possible
setBottomOffsetStrength()Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
| value | number | The number of pixels that the eye model part will move when the player looks down | 1 |
Returns:
| Type | Description |
|---|---|
| table | Returns self for chaining |
Example:
rightEye:setBottomOffsetStrength(0.5)The number of pixels that the eye model part will move when the player looks left as far as possible
setLeftOffsetStrength()Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
| value | number | The number of pixels that the eye model part will move when the player looks left | 1 |
Returns:
| Type | Description |
|---|---|
| table | Returns self for chaining |
Example:
rightEye:setLeftOffsetStrength(0.34)The number of pixels that the eye model part will move when the player looks right as far as possible
setRightOffsetStrength()Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
| value | number | The number of pixels that the eye model part will move when the player looks right | 1 |
Returns:
| Type | Description |
|---|---|
| table | Returns self for chaining |
Example:
rightEye:setRightOffsetStrength(0.66)