|
| 12 May 2015 06:47 PM |
The first bit of this video:
https://www.youtube.com/watch?v=LSoHwlC7FSg
Trying to figure out how AxisAngle did this. Anyone have an idea? I've already tried adjusting CFrame based on the speed of the camera, but this turns out rough. |
|
|
| Report Abuse |
|
|
|
| 12 May 2015 06:57 PM |
| Rough isn't exactly a great descriptive word of your current result. Maybe a gyazo would help. |
|
|
| Report Abuse |
|
|
|
| 12 May 2015 07:04 PM |
http://gyazo.com/c6875335e008d0ffa519fa7a6812ef9f
Unfortunately, if the gif isn't going at normal speed, you can't see the effect very well. As I'm turning, the animation is choppy. |
|
|
| Report Abuse |
|
|
| |
|
|
| 12 May 2015 07:08 PM |
| Are you using while wait() do? If so RunService.RenderStepped or whatever might run smoother. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
EgoMoose
|
  |
| Joined: 04 Feb 2009 |
| Total Posts: 2896 |
|
|
| 12 May 2015 07:45 PM |
Well that's the magic and beauty of it.
He uses the spring functions quite literally like a spring. The C1/C0 of your arm essentially has a springing tween attached to it. Meaning that when the C1/C0 of the arm is not in the desired position it will (much like a spring) return to the desired position.
--// Here's a really basic spring concept.
local val = 0 local desired = 50 local step = 1
function basicSpring() if val ~= desired then local diff = val > desired and val - desired or desired - val if diff < step then val = val > desired and val - diff or val + diff else val = val > desired and val - step or val + step end print(val, diff) else print("In desired position!") end end
game:GetService("RunService").RenderStepped:connect(basicSpring) while wait(5) do desired = math.random(0, 100) end
--// End of code
So when you say you get a really jittery result you're only missing one part and that's a proper way of spring tweening your CFrames. Find that and your gold.
Sorry if you already knew all this :P |
|
|
| Report Abuse |
|
|
|
| 12 May 2015 08:01 PM |
| I appreciate your help, I'll try to further expand more on my script. Although if anyone else has any more suggestions, I would like to hear them also. |
|
|
| Report Abuse |
|
|