mylowoof
|
  |
| Joined: 27 Mar 2014 |
| Total Posts: 167 |
|
|
| 21 Jun 2015 06:19 AM |
I am attempting to do CFrame animation. I have a script which disconnects the Motor6D's in the character and replaces them with welds. So far so good. It removes all animations. However, i cant figure out how to set the actual cframe so the limbs are rotated in the correct direction. This is the first script i tried out. Its meant to put the characters right arm in the default tool position.:
torso["Left Arm"].C0 = CFrame.new(1.50000024, 0.501270056, -0.499999523, 1, 1.30917414e-007, -1.31458393e-007, -1.31134016e-007, -0.00247461861, -0.999996781, -1.31242331e-007, 0.999996901, -0.00247461954)
I took those coordinates via script from a dummy which i was using to test my animations.
The rotation turned out exactly as it should, but the position was slightly above the torso.
Changing 'C0' to 'C1' put it in the right position, but rotated 180 degrees so it faced backwards on the character.
So i decided to try using CFrame.Angles, because i don't understand how the rotational matrix works.
After about 2 hours or so (literally), the best i could come up with was this:
torso["Left Arm"].C1=CFrame.new(torso["Left Arm"].C1.p,CFrame.Angles(math.rad(0), math.rad(90), math.rad(0)))
Which brings up the following error
bad argument #2 to 'new' (Vector3 expected, got userdata)
How do i write the CFrame coordinates out so that they show up no errors and are fairly easily customisable? (bearing in mind that i don't know how the CFrame rotational matrix works) Is there an easier method that experienced developers use?
Thanks in advance. |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2015 06:23 AM |
| Make an animation with the animation plugin, set the priority to action, and export when you are done. http://wiki.roblox.com/index.php?title=Animations |
|
|
| Report Abuse |
|
|
mylowoof
|
  |
| Joined: 27 Mar 2014 |
| Total Posts: 167 |
|
|
| 21 Jun 2015 06:27 AM |
| I am coding my own animation system because it is necessary in my game for the animations to be stopped at any time. The animations need to slide smoothly back to the default position, something that isn't possible with the Roblox animation system. |
|
|
| Report Abuse |
|
|
mylowoof
|
  |
| Joined: 27 Mar 2014 |
| Total Posts: 167 |
|
|
| 21 Jun 2015 06:59 AM |
| Not sure i was completely clear on what i want in the original post. Basically, what's the best way of adjusting either C0 or C1 so that the angles are easily editable? |
|
|
| Report Abuse |
|
|
mylowoof
|
  |
| Joined: 27 Mar 2014 |
| Total Posts: 167 |
|
| |
|
mylowoof
|
  |
| Joined: 27 Mar 2014 |
| Total Posts: 167 |
|
| |
|
mylowoof
|
  |
| Joined: 27 Mar 2014 |
| Total Posts: 167 |
|
|
| 22 Jun 2015 04:50 AM |
Realized that you dont need all the extra info about my animation system o_o
All i want is a command to enter into the command bar to change the C0 or C1 of a weld. It needs to be able to edit the rotation of Part1 relative to Part0 without changing the position. |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2015 05:01 AM |
This Video may help you
https://www.youtube.com/watch?v=WN1ziF3eCMY&list=PLA4609EA2E5307C94&index=9 |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2015 05:02 AM |
| it Does not use animation plugin |
|
|
| Report Abuse |
|
|
|
| 22 Jun 2015 05:13 AM |
| Use math.rad() and record rotations like that. |
|
|
| Report Abuse |
|
|