|
| 31 Aug 2014 02:32 AM |
I am atrocious with math and I want to do gun animations.
Specifically dynamic animations like aiming down the sights, etc etc.
I don't know how you use cframe interpolator, so if that is the way to do it, please explain how its used? |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2014 02:39 AM |
i know you wizards can easily do this
tell me your secrets! |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2014 02:54 AM |
I'll give you the CFrame I use for my aiming
I'm not gonna give you any info on how I animate and use the variables, sorry
while wait() do local plr = Game.Players.LocalPlayer; local data = plr.Data; local user = plr.Character local mouse = plr:GetMouse(); local lookAt = user.Torso.CFrame:toObjectSpace(CFrame.new(workspace.CurrentCamera.CoordinateFrame.p, mouse.Hit.p));
lookAt = lookAt * CFrame.new(0,0.5,1) * CFrame.Angles(1.585,0,0); _G.RightArm = lookAT; _G.LeftArm = CFrame.new(0.7,0.5,1.2) * CFrame.Angles(0,-0.4,0) * lookAt; end |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2014 02:55 AM |
The hardest but quickest way is to use welding. It's like making a stop motion animation. You make multiple frames, print out the respective values for the targeted/animated limbs and then run a function that uses those values accordingly. |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2014 02:56 AM |
Use this to begin smoothly moving welds/ motors in loops:
function Return(Alpha, Bravo, Charlie) return Alpha + (Bravo - Alpha) * Charlie; end function CLerp(C1, C2, Speed) local Comp1 = {C1.X, C1.Y, C1.Z, C1:toEulerAnglesXYZ()}; local Comp2 = {C2.X, C2.Y, C2.Z, C2:toEulerAnglesXYZ()}; for num, accel in pairs(Comp1) do Comp1[num] = Return(accel, Comp2[num], Speed); end return CFrame.new(Comp1[1], Comp1[2], Comp1[3]) * CFrame.Angles(select(4,unpack(Comp1))); end |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2014 03:00 AM |
the mystical CLerp
i've only heard tales..
I have done it the hard way before, wasnt satisfied with the quality |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2014 03:02 AM |
and question
what are alpha, bravo, or charlie?
|
|
|
| Report Abuse |
|
|
|
| 31 Aug 2014 09:37 AM |
| Alpha is the weld you're setting, bravo is the variable you're using to edit it, and Charlie is the speed, |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2014 02:02 PM |
| by variable do you mean the edited CFrame or what? |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2014 02:42 PM |
| The variable can be the C0 or C1 of the main weld, or it can be a CFrame variable. |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2014 04:20 PM |
SO like, CFrame = CFrame * CFrame.Angles(30,30,30) ?
Kind of like that? |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2014 04:49 PM |
rightArm = CFrame.new(0,0,0) --if assigned correctly, this variable will smoothly move the rightarm to the center of the player's torso (if you've created a weld in between the two)
call the CLerp like this, at the end of a loop:
rightWeld.C0 = CLerp(rightWeld.C0, rightArm, 0.5)
|
|
|
| Report Abuse |
|
|
|
| 31 Aug 2014 08:08 PM |
| You've been more helpful than a good 5 months of attempting to complete the philosophers stone of roblox |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2014 08:29 PM |
| I agree, I'm going to track this thread. Very helpful |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2014 08:59 PM |
honestly this sort of stuff should be in the cook book
|
|
|
| Report Abuse |
|
|
Waffloid
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1606 |
|
|
| 02 Sep 2014 12:50 AM |
Tracking dis thread dawg.OH WAIT! I ALREADY CREATED SOMETHING LIKE THIS
YE
yip yip yippady yip yip |
|
|
| Report Abuse |
|
|
Waffloid
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1606 |
|
|
| 02 Sep 2014 12:51 AM |
osht this used a CLerp sowwy ppls
;-;
yip yip yippady yip yip |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2014 12:52 AM |
| What are you doing you inbred idiot? |
|
|
| Report Abuse |
|
|
Waffloid
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1606 |
|
|
| 02 Sep 2014 11:35 AM |
Me? Calm down man.
Do I know you or something?
yip yip yippady yip yip |
|
|
| Report Abuse |
|
|