|
| 08 Jul 2015 10:37 AM |
local x = 1
game:GetService'RunService'.RenderStepped:connect(function() for i = 1,#Tablets do Tablets[i].CFrame = Character.Torso.CFrame*CFrame.Angles(0,math.rad(360/#Tablets*x),0)*CFrame.new(0,0,-2*#Tablets) end end) |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 08 Jul 2015 10:45 AM |
Interpolating CFrames?
http://www.roblox.com/CFrameInterpolator-Module-item?id=161739700 |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 10:48 AM |
Yes, but it's a little involved. Stravant et al. made an axis-angle interpolation that's a good tradeoff between speed and accuracy: http://www.roblox.com/CFrameInterpolator-Module-item?id=161739700
If for some reason you need to be more accurate than that (it really isn't noticeably inaccurate in most cases) he also has an accurate function for quaternion interpolation that's about 4x slower, which I only half understand: http://wiki.roblox.com/index.php?title=User:XLEGOx/quaternioninterpolate
~Upload code to codepad-dot-org with Lua syntax highlighting to preserve indentation and make it easier to read!~ |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 10:52 AM |
CFrame:lerp(CFrame goal, Alpha) StartingPoint:lerp(EndPoint, Percentage (0 - 1))
So apply it in a loop, and slowly change it from 0 to 1. |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 10:53 AM |
Yeah... So I didn't know they added that method and I'm super stoked right now. When was it added?
~Upload code to codepad-dot-org with Lua syntax highlighting to preserve indentation and make it easier to read!~ |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 10:55 AM |
It was added a few days ago, TheGamer101 made it; I only know due to RBXDev. They don't update the public like they used to anymore.
"New feature: CFrame:lerp() 1 day 21 hours ago" 2 days ago. |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 08 Jul 2015 11:02 AM |
| YUSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 11:03 AM |
I think I applied to that once but to no avail because I guess technically I haven't made a complete game lol. Thanks for the info.
~Upload code to codepad-dot-org with Lua syntax highlighting to preserve indentation and make it easier to read!~ |
|
|
| Report Abuse |
|
|
|
| 08 Jul 2015 11:10 AM |
how come this isn't working?
Tablets[i].CFrame = Tablets[i].CFrame:lerp(Character.Torso.CFrame*CFrame.Angles(0,math.rad(360/#Tablets*x),0)*CFrame.new(0,0,-2*#Tablets),i); |
|
|
| Report Abuse |
|
|