generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: What is the best way to do high level animations

Previous Thread :: Next Thread 
DonFeskeral is not online. DonFeskeral
Joined: 05 Feb 2014
Total Posts: 6555
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
DonFeskeral is not online. DonFeskeral
Joined: 05 Feb 2014
Total Posts: 6555
31 Aug 2014 02:39 AM
i know you wizards can easily do this

tell me your secrets!
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
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
DragonODeath is not online. DragonODeath
Joined: 02 May 2011
Total Posts: 1252
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
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
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
DonFeskeral is not online. DonFeskeral
Joined: 05 Feb 2014
Total Posts: 6555
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
DonFeskeral is not online. DonFeskeral
Joined: 05 Feb 2014
Total Posts: 6555
31 Aug 2014 03:02 AM
and question

what are alpha, bravo, or charlie?

Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
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
DonFeskeral is not online. DonFeskeral
Joined: 05 Feb 2014
Total Posts: 6555
31 Aug 2014 02:02 PM
by variable do you mean the edited CFrame or what?
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
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
DonFeskeral is not online. DonFeskeral
Joined: 05 Feb 2014
Total Posts: 6555
31 Aug 2014 04:20 PM
SO like, CFrame = CFrame * CFrame.Angles(30,30,30) ?

Kind of like that?
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
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
DonFeskeral is not online. DonFeskeral
Joined: 05 Feb 2014
Total Posts: 6555
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
Brickman2010 is not online. Brickman2010
Joined: 20 Nov 2009
Total Posts: 5547
31 Aug 2014 08:29 PM
I agree, I'm going to track this thread. Very helpful
Report Abuse
DonFeskeral is not online. DonFeskeral
Joined: 05 Feb 2014
Total Posts: 6555
31 Aug 2014 08:59 PM
honestly this sort of stuff should be in the cook book

Report Abuse
Waffloid is not online. 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 is not online. 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
DonFeskeral is not online. DonFeskeral
Joined: 05 Feb 2014
Total Posts: 6555
02 Sep 2014 12:52 AM
What are you doing you inbred idiot?
Report Abuse
Waffloid is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image