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: Smooth cframing

Previous Thread :: Next Thread 
edenojack is not online. edenojack
Joined: 18 Jul 2008
Total Posts: 989
02 May 2013 01:38 PM
I have been working on an fps hopper for the last few days (The tool itself has gone through weeks of writing and re-writing however) and I've been making animations for the weapons. However, they are all very jerky and cut into eachother. If you have played DeadZoneZak's Battlezone game, then you can see that the animations are incredibly smooth.

At the moment, my animations consist of code LIKE this;
a = 0
function animatezoom()
if zoom == true do
repeat
a = a+1
GUNPOS.C0 =
CFrame.new(192, 0.8+Movement/20, 34+Movement/20)
*CFrame.Angles(math.rad(0), math.rad(a present value), math.rad(0))
until a == 20 or zoom == false
elseif zoom == false do
the opposite of the above. Go figure.
end

The repeating thing works, until I have two opposing animations. I have a position for the gun to be while the character is running, aiming, reloading and so forth.

Is there a way to, not only tidy up this code, but to also make transitions smoother?
Report Abuse
getkoed2 is not online. getkoed2
Joined: 11 Apr 2010
Total Posts: 1144
02 May 2013 03:32 PM
:d

It's if ... then, elseif ... then, NOT if ... do
Report Abuse
edenojack is not online. edenojack
Joined: 18 Jul 2008
Total Posts: 989
02 May 2013 03:40 PM
Its not my actual code :P its just an example of what I'm using to move objects.
Report Abuse
doneyes is not online. doneyes
Joined: 21 Mar 2008
Total Posts: 3466
02 May 2013 03:54 PM
Here use this: http://www.youtube.com/watch?v=QH7XlacauAw

Model is in the video description.


When you go into the setup, make sure the only thing selected is what you want to animate (the arms I assume) and then all you have to do is clone the script it creates into the player's character and enable it.

You control how smooth it is. For extra smoothness, put the framerate all the way down to .01 and then make the frames pretty close together.

I'm working on a way to do this automatically and it will be released in a few weeks. Keep an eye out for it.
Report Abuse
edenojack is not online. edenojack
Joined: 18 Jul 2008
Total Posts: 989
02 May 2013 04:34 PM
I like the system, easy to use, easy to execute. However, my tool does not use the arms for welding, head on to:
http://www.roblox.com/Scorched-Earth-Pre-Alpha-Alpha-V-0-1-place?id=114552303
to have a look at my tool.
For my guns I am using this
There is the characters head, and then a part called "Main" is welded to it.
"Main" is put into the players local camera.
"Main" is also the only thing being animated.

CGun (Current Gun) is welded to the Main, anything I 'animate' is just me manipulating the C0 of Mains weld.

However, I am not very experienced at animation.
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