ownedyou1
|
  |
| Joined: 03 Jul 2008 |
| Total Posts: 528 |
|
|
| 07 Mar 2016 08:05 AM |
So i have a game where i scripted animations in myself, i know that kind of stuff is deprecated to most but me being and oldschool player its all i really know how to do when it comes to this subject. Everything works nice, but when you start to combo abilities your char gets a little glitched out. So i decided id try to make a for loop that would always bring the arms down to the resting position after an attack. And i havnt even come close yet everything i do doesnt work is there anyone whos better at math that thinks they can help me? an example of how im scripting the animations: for i = 1, 12 do LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0.08, 0) LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0.08) RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, -0.08, 0) RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, -0.08) Run.Stepped:wait(0.005) end |
|
|
| Report Abuse |
|
|
oni0n
|
  |
| Joined: 04 Nov 2012 |
| Total Posts: 2975 |
|
|
| 07 Mar 2016 08:45 AM |
trash this entire thing, and learn linear interpolation
deprecated methods like these aren't further supported by roblox, which is why not a lot of people will be around here to help you
linear interpolation [or lerping] is the interpolation of an object from one position to another smoothly, and it works extremely well with animation
#code cout << "Proof by analogy is fraud" << endl; //Bjarne Stroustrup |
|
|
| Report Abuse |
|
|
ownedyou1
|
  |
| Joined: 03 Jul 2008 |
| Total Posts: 528 |
|
|
| 07 Mar 2016 09:19 AM |
| do you think you could provide me with a brief example? a syntax to work off of maybe |
|
|
| Report Abuse |
|
|
ownedyou1
|
  |
| Joined: 03 Jul 2008 |
| Total Posts: 528 |
|
|
| 07 Mar 2016 09:29 PM |
| Bump: does anyone know how to lerp Rofl i looked at examples and they are pretty confusing at this point :'( |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 09:31 PM |
| Stick to animations, they are really simple and work best for what you need. |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2016 09:32 PM |
It's fairly simple. Its a CFrame method, you pass in a destination cframe and a percent (0-1) BOOM lerp. Here is an example model
http://www.roblox.com/CFrame-lerp-Example-item?id=270781812 |
|
|
| Report Abuse |
|
|
ownedyou1
|
  |
| Joined: 03 Jul 2008 |
| Total Posts: 528 |
|
|
| 08 Mar 2016 10:31 AM |
yeah i see that but i dont see how i can make an animation out of it lol?
|
|
|
| Report Abuse |
|
|
os_time
|
  |
| Joined: 15 Feb 2014 |
| Total Posts: 2247 |
|
| |
|
ownedyou1
|
  |
| Joined: 03 Jul 2008 |
| Total Posts: 528 |
|
|
| 09 Mar 2016 08:56 AM |
| wtf did this weeabo say to me |
|
|
| Report Abuse |
|
|