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: Motor6D

Previous Thread :: Next Thread 
doneyes is not online. doneyes
Joined: 21 Mar 2008
Total Posts: 3466
27 Jun 2014 11:32 PM
Does it only spin in 1 direction?

I want to make an animation on a custom humanoid without use of the animation maker. I'm playing around with motor6d and in it's properties things only spin one way however the roblox player model can move its motors any direction when using their animation maker.

What am I missing?
Report Abuse
BalisticMissile is not online. BalisticMissile
Joined: 05 Mar 2009
Total Posts: 282
27 Jun 2014 11:40 PM
You'll need to edit the actual CFrame properties of the motor in order to for lack of a better term "simulate" the normal movement of the motor.
Report Abuse
doneyes is not online. doneyes
Joined: 21 Mar 2008
Total Posts: 3466
27 Jun 2014 11:51 PM
It's teleporting to the next position instantly rather than moving at a set speed. Here is my script:

m = Instance.new("Motor6D")
m.Name = "Test Motor"
m.C0 = CFrame.new(0,4,0)
m.Part0 = script.Parent.Part1
m.C1 = CFrame.new() * CFrame.Angles(20,50,10)
m.Part1 = script.Parent.Part2
m.Parent = script.Parent
wait(1)
m.MaxVelocity = .01
m.C1 = CFrame.new() * CFrame.Angles(-20,100,-10)
Report Abuse
BalisticMissile is not online. BalisticMissile
Joined: 05 Mar 2009
Total Posts: 282
27 Jun 2014 11:56 PM
You'll need to write a type of Slerp(Spherical Linear Interpolation). For example using your setup:

m = Instance.new("Motor6D")
m.Name = "Test Motor"
m.C0 = CFrame.new(0,4,0)
m.Part0 = script.Parent.Part1
m.Part1 = script.Parent.Part2
m.Parent = script.Parent

amount = math.rad(45)
for i = 1, 20 do
wait(0.01)
m.C1 = m.C1*CFrame.Angles(0,0,amount/20)
end

--Just play with this stuff
Report Abuse
BalisticMissile is not online. BalisticMissile
Joined: 05 Mar 2009
Total Posts: 282
28 Jun 2014 12:03 AM
Although don't take this as an actual example of Slerp, I just used that to kind of explain what it was.
Report Abuse
doneyes is not online. doneyes
Joined: 21 Mar 2008
Total Posts: 3466
28 Jun 2014 12:08 AM
Then why not use CFrame? I don't think motor6d is supposed to use interp. It's too smooth when I see it used.
Report Abuse
BalisticMissile is not online. BalisticMissile
Joined: 05 Mar 2009
Total Posts: 282
28 Jun 2014 12:10 AM
I did use CFrame. You can make it more smooth by changing the wait and adding more frames. So changing the 20 to say 50.
Report Abuse
BalisticMissile is not online. BalisticMissile
Joined: 05 Mar 2009
Total Posts: 282
28 Jun 2014 12:11 AM
Also to note that ROBLOX doesn't actually use their Motor6D like you would normally use them anymore, they use their new animations from their animation maker.
Report Abuse
doneyes is not online. doneyes
Joined: 21 Mar 2008
Total Posts: 3466
28 Jun 2014 12:27 AM
And what is responsible for that kind of movement?
Report Abuse
BalisticMissile is not online. BalisticMissile
Joined: 05 Mar 2009
Total Posts: 282
28 Jun 2014 12:29 AM
They most likely use a CFrame that is ran at speeds that we can't use, since our wait time is limited.
Report Abuse
doneyes is not online. doneyes
Joined: 21 Mar 2008
Total Posts: 3466
28 Jun 2014 08:07 AM
No that's inefficient. They have some way and other people use motor6D how I'm saying.

I swear there is a way.
Report Abuse
BalisticMissile is not online. BalisticMissile
Joined: 05 Mar 2009
Total Posts: 282
28 Jun 2014 07:36 PM
I'm considered a pretty good animator on ROBLOX. If you want proof go look at my dragon(wyvern) place. There is not another way. It's all either frame by frame or by using the desiredangle of the motor, which can only rotate on one axis until you change the cframe. No other way.
Report Abuse
BalisticMissile is not online. BalisticMissile
Joined: 05 Mar 2009
Total Posts: 282
28 Jun 2014 07:44 PM
Also there is a difference between C0 and C1. C0 will be the one to change the actual axis of rotation while C1 will be the offset from the axis.
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