Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[EasingStyle] Does linear have more potential than the rest?

Asked by
Infocus 144
4 years ago

This isn't a direct scripting question, but I believe its within its realms. I just got into animating using the Moon Animation Editor and I am a complete noob as I animated using clerp (CFrame lerp, the method used by Strife creator, Fenrier). There are several easing styles, but does linear have the potential to be better than the rest? What do you guys personally use when you animate? Because I know people that use linear entirely. Are there any pros/cons in using linear or the others? Please teach me.

Thank you

0
Why don't you post this on DevForum... Block_manvn 395 — 4y
0
Im sorry, I joined this site years ago, but I've only been active a couple days. Can you link me to the devforum? Infocus 144 — 4y

1 answer

Log in to vote
1
Answered by
JesseSong 3916 Moderation Voter Community Moderator
4 years ago

Read this on the Developer hub: https://developer.roblox.com/en-us/api-reference/enum/EasingStyle

The EasingStyle determines the way in which TweenService tweening will act.

This basically means that easingstyle controls how the tweenservice behaves like. For example the tweenservice has easingstyle and easingdirection

EasingStyle is the way the tween moves like the effect here is a list of Easing Styles: Linear Sine Back Quad Quart Quint Bounce Elastic Exponential Circular Cubic

and EasingDirection is basically the way the tween moves in that direction for example. Is it in or out

How to create a tween all you have to do is say

local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
    2, -- Time
    Enum.EasingStyle.Bounce, -- EasingStyle
    Enum.EasingDirection.Out, -- EasingDirection
    -1, -- RepeatCount (when less than zero the tween will loop indefinitely)
    true, -- Reverses (tween will reverse once reaching it's goal)
    0 -- DelayTime
)

local tween = TweenService:Create(tweenInfo, {Position = Vector3.new(0, 30, 0)})
-- This actually creates the tween and sets the position to the vector3 coordinates

tween:Play() -- this will play the tween
wait(10) -- this will wait 10 seconds
tween:Cancel() -- cancel the animation after 10 seconds
Ad

Answer this question