|
| 23 Jun 2016 01:09 PM |
currently just trying to get the arm to the part, not worrying about rotation...
i feel like its a stupid mistake because when i tried the same code on a different part (not trying to manipulate a weld) it works
local uis = game:GetService("UserInputService")
uis.InputBegan:connect(function(key) if key.UserInputType == Enum.UserInputType.MouseButton1 then for i = 1,100 do game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = CFrame.new(game.Players.LocalPlayer.Character["Left Arm"].CFrame.p):lerp(script.Parent.Handle.CFrame, i/100) wait() end end end)
It's simple physics |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 01:15 PM |
Lerping is a type of interpolation. Basically, it creates a line with a rotation matrix, and sets the distance between the start point and end point as one (not in studs, but a mathematical unit).
CFrame.thing= start_CFrame:lerp(end_CFrame,i) --where i is a number equal to or between 0 and 1
public static void main(String[] args) { System.out.println("Oops! Wrong language."); } |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 01:17 PM |
For this, why don't you just use "Left Arm"'s CFrame and lerp it like that. Converting it to .p removes its rotation matrix.
public static void main(String[] args) { System.out.println("Oops! Wrong language."); } |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 01:32 PM |
local uis = game:GetService("UserInputService")
uis.InputBegan:connect(function(key) if key.UserInputType == Enum.UserInputType.MouseButton1 then for i = 1,100 do game.Players.LocalPlayer.Character.Torso["Left Shoulder"].C0 = (game.Players.LocalPlayer.Character["Left Arm"].CFrame):lerp(script.Parent.Handle.CFrame, i/100) wait() end end end)
this is what i changed it too... still flies around randomly
It's simple physics |
|
|
| Report Abuse |
|
|
| |
|
guges
|
  |
| Joined: 07 May 2016 |
| Total Posts: 1515 |
|
|
| 23 Jun 2016 02:04 PM |
| Because weld C0s and C1s are in object space |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 02:40 PM |
Alright now i just slide around the map....
It's simple physics |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|