FangousJoin Date: 2010-07-03 Post Count: 4448 |
title |
|
FangousJoin Date: 2010-07-03 Post Count: 4448 |
bump |
|
FangousJoin Date: 2010-07-03 Post Count: 4448 |
bump |
|
FangousJoin Date: 2010-07-03 Post Count: 4448 |
BUMP |
|
|
FangousJoin Date: 2010-07-03 Post Count: 4448 |
i didnt say lerp did i? |
|
SoybeenJoin Date: 2010-02-17 Post Count: 21462 |
Tween its position? You can use the TweenService to tween any property. |
|
FangousJoin Date: 2010-07-03 Post Count: 4448 |
yeah but models are multiple parts with multiple properties.
i want to tween the position of the model relative to its primary part |
|
SoybeenJoin Date: 2010-02-17 Post Count: 21462 |
Yeah just tweening its primary part should tween the rest, right? |
|
|
...you can use lerp to tween the model. There's no method that'll do it for you with one use. It'll require a loop to create the effect you're looking for.
local Model = ?
local StartCFrame = Model.PrimaryPart.CFrame
local EndCFrame = ?
for i = 0, 1, 0.01 do
Model:SetPrimaryPartCFrame(StartCFrame:Lerp(EndCFrame,i))
wait()
end |
|
SoybeenJoin Date: 2010-02-17 Post Count: 21462 |
Unfortunately Xerxes is right, I tried just tweening the PrimaryPart and only the PrimaryPart moved.
Looks like you'll have to lerp. I would just put it in a coroutine or something. |
|
|
Maybe tween every part with a for i, v loop? |
|
SoybeenJoin Date: 2010-02-17 Post Count: 21462 |
^ I wouldn't |
|
IceladenJoin Date: 2009-02-08 Post Count: 6177 |
"i didnt say lerp did i?"
the only way to do it noob |
|
|
'^ I wouldn't' Same, but maybe it's worth a ##### ############ doesn't like parts colliding with each other to be fair |
|
SoybeenJoin Date: 2010-02-17 Post Count: 21462 |
Ease up. He was asking because he didn't know if there was a way to use the TweenService to move models, which is more fair a question to ask than 95% of what comes through this subforum. |
|
IceladenJoin Date: 2009-02-08 Post Count: 6177 |
its not worth it |
|
|
'its not worth it'
Chill mfg |
|
IceladenJoin Date: 2009-02-08 Post Count: 6177 |
I am "chill"??? it's not worth doing that inefficient method |
|
FangousJoin Date: 2010-07-03 Post Count: 4448 |
I'm only asking because lerping usually feels more framey than tweenservice. |
|
SoybeenJoin Date: 2010-02-17 Post Count: 21462 |
Lerping on RenderStepped shouldn't skip frames.
You should lerp based on some consistently increasing value, like workspace.DistributedGameTime, os.time(), or tick() to make sure the speed of the effect isn't throttled by their FPS |
|