|
| 28 Jun 2013 02:27 PM |
| I am aware the user animations are locked, so is there another way? |
|
|
| Report Abuse |
|
|
xSIXx
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 9202 |
|
|
| 28 Jun 2013 02:29 PM |
keep setting the C1 to a weld with another value?
no one is going to help you here, this subject is like, huge. |
|
|
| Report Abuse |
|
|
| |
|
IAmAMelon
|
  |
| Joined: 14 Mar 2013 |
| Total Posts: 167 |
|
|
| 28 Jun 2013 03:16 PM |
Interpolating two CFrames are your best options, it's fairly easy to do as well.
|
|
|
| Report Abuse |
|
|
|
| 28 Jun 2013 03:17 PM |
Like these?
http://www.roblox.com/TestingFreeRunning-place?id=104947889
*Touch the translucent black boxes* |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2013 03:22 PM |
| User animations? Use the C0 property of the Motor6D's in the Torso of the Character. |
|
|
| Report Abuse |
|
|
av83r
|
  |
| Joined: 28 Jul 2009 |
| Total Posts: 2580 |
|
|
| 28 Jun 2013 03:49 PM |
@ six: shut up noob.
the easiest and arguably the best way is welds. you can look up how to do it in the wiki.
you can use math.sin for smooth elliptical movements, running, jumping, climbing, swimming etc.
everything else you want to use something like this:
while true do wait() if x ~= tx then x = cx + (cx2 - cx1) *r script.Parent.Chest.Weld.C1 = CFrame.new(Vector3.new(0.4,-0.5,0))* CFrame.fromEulerAnglesXYZ(math.rad(x), math.rad(0), math.rad(0)) elseif tx ~= 0 then cx = 0 cx2 = x
and you can keep adding on to that.
Since you're no novice, I assume you can take it from here. |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2013 03:55 PM |
@above
How is someone supposed to understand code with countless undefined variables in it? |
|
|
| Report Abuse |
|
|
magnalite
|
  |
| Joined: 18 Oct 2009 |
| Total Posts: 2467 |
|
|
| 28 Jun 2013 04:44 PM |
@av83r
Have you actually tried doing that? |
|
|
| Report Abuse |
|
|
av83r
|
  |
| Joined: 28 Jul 2009 |
| Total Posts: 2580 |
|
|
| 28 Jun 2013 04:50 PM |
@mag: yeah, I've spent countless hours using welds for a lot of things.
basically one variable is the start point and the second one is the ending point, sorry, should have explained that. |
|
|
| Report Abuse |
|
|
magnalite
|
  |
| Joined: 18 Oct 2009 |
| Total Posts: 2467 |
|
|
| 28 Jun 2013 04:56 PM |
@av83r
Doing that is a horrible way of doing things. Its not dynamic at all. |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 28 Jun 2013 05:03 PM |
function tweenCFrame(Part, End, Step, Wait, D) if D == 1 then D = .99 end local oldPos = Part.CFrame.p local oldAng = Vector3.new(Part.CFrame:toEulerAnglesXYZ()) local newPos = End.p local newAng = Vector3.new(End:toEulerAnglesXYZ()) local Co = coroutine.create(function() i = 0 a = Step while i <= 1 do Part.CFrame = CFrame.new((oldPos*(1-i))+(newPos*i))*CFrame.Angles((oldAng.X*(1-i))+(newAng.X*i),(oldAng.Y*(1-i))+(newAng.Y*i),(oldAng.Z*(1-i))+(newAng.Z*i)) i = i + a a = Step*(1-i*D) wait() end Part.CFrame = End error() end) coroutine.resume(Co) if Wait then while coroutine.status(Co) ~= "dead" do wait() end end end
Hoorah. Sorry it's so hacky, its old. Also, when I made this (using someone elses whose name I forgot as a reference) I used toEulerAnglesXYZ, that should probably be changed. The arguments: Part - userdata, the part End - coordinateframe, the final cframe Step - float, the speed, essentially Wait - boolean, if you want the script to pause while the animation plays out D - float 0-1, dampening property |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 28 Jun 2013 05:04 PM |
| Welds are the same thing, slightly modified. |
|
|
| Report Abuse |
|
|
av83r
|
  |
| Joined: 28 Jul 2009 |
| Total Posts: 2580 |
|
|
| 28 Jun 2013 06:25 PM |
| @mag: and I suppose you have a better way to create a non linear/cyclical motion? |
|
|
| Report Abuse |
|
|