Supr14
|
  |
| Joined: 08 Nov 2015 |
| Total Posts: 1817 |
|
|
| 10 Jul 2017 04:57 PM |
I'm trying to create a idle animation with cframe lerp, it works for one half, but when i do attacks, it glitches, the idle animation isn't finished when i do a attack and so screws up my attack animation
Any solution to this problem, like breaking the idle animation when you walk/do other animations? |
|
|
| Report Abuse |
|
|
Odawg566
|
  |
| Joined: 28 Jun 2015 |
| Total Posts: 362 |
|
|
| 10 Jul 2017 05:01 PM |
| why are you using cframe? Just make and idle animation with animation editor export it, and then put the id in the roblox animation script. |
|
|
| Report Abuse |
|
|
Supr14
|
  |
| Joined: 08 Nov 2015 |
| Total Posts: 1817 |
|
|
| 10 Jul 2017 05:02 PM |
No, that's not how i want to do it, i want to do it with cframe.lerp
I've seen plenty idle animations with cframe.lerp and they all went smooth |
|
|
| Report Abuse |
|
|
Odawg566
|
  |
| Joined: 28 Jun 2015 |
| Total Posts: 362 |
|
| |
|
Supr14
|
  |
| Joined: 08 Nov 2015 |
| Total Posts: 1817 |
|
|
| 10 Jul 2017 05:23 PM |
Bump i really need help
People in sb won't help me because they're too full of themselves |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2017 05:25 PM |
Actually, I want to learn this as well, considering the animation editor's limitations.
|
|
|
| Report Abuse |
|
|
|
| 10 Jul 2017 05:29 PM |
After doing a little search, I found a decent tutorial that explains CFrame animations, doesn't use lerp, but I imagine that you'd be able to implement it.
https://www.youtube.com/watch?v=uQv5quHgdXQ&t=380s |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2017 05:30 PM |
local isAttacking = false
if attacking then:
isAttacking=true
inside idle animation loop:
if isAttacking then break end |
|
|
| Report Abuse |
|
|
Supr14
|
  |
| Joined: 08 Nov 2015 |
| Total Posts: 1817 |
|
|
| 11 Jul 2017 10:42 AM |
@Aggressive
It works but, i want it also to break when i walk, so i made the same thing with walking, whenever i walk, walk goes true, i've tried this the same way but it doesn't work? Is it different or something? |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2017 10:44 AM |
TweenService smoothly tweens between CFrames. I recommending taking advantage of that if you're looking to make animations in CFrames.
|
|
|
| Report Abuse |
|
|
Supr14
|
  |
| Joined: 08 Nov 2015 |
| Total Posts: 1817 |
|
|
| 11 Jul 2017 10:45 AM |
| Yeahhh no imma just stick with cframe.lerp |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2017 11:07 AM |
function Attack() Attacking = true --Blah blah Attacking = false end
while true do wait() if State == "Idle" and not Attacking then --Idle end end |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2017 11:51 AM |
you want to use a loop if you're looking to lerp for i = 1,10 do wait(0.1) startingcframe:Lerp(targetcframe, i/10) end if you want to create animations like that, i recommend you use welds if you try to cframe the joints, the default walking animation will mess it up, unless you remove animator |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2017 11:54 AM |
Joint.C0 = Joint.C0:lerp(CFrame.new(x, y, z) * CFrame.Angles(math.rad(r * math.sin(tick()*spd), math.rad(r * math.sin(tick()*spd), math.rad(r * math.sin(tick()*spd)), s)
you can use math.cos too
also if you want sort of a circular movement then use both math.cos and math.sin on different axises |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|