lostend
|
  |
| Joined: 21 Aug 2011 |
| Total Posts: 8265 |
|
|
| 15 Oct 2015 06:27 PM |
runserv:BindToRenderStep('ArmUpdate',Enum.RenderPriority.Camera.Value,function() local x,y,z,r1,r2,r3,r4,r5,r6,r7,r8,r9=camera.CoordinateFrame:components() neck.C0=CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)*CFrame.Angles(math.asin(r6),0,0) end) This is what I have. It works, except when I look up, it gets closer to my screen, and when I look down, it gets further away. Any ideas? |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 15 Oct 2015 06:29 PM |
most likely the arm is welded (by the default motor6D) to the torso you're gonna have to recreate the weld except weld it to the HEAD instead
Red Blossoms |
|
|
| Report Abuse |
|
|
lostend
|
  |
| Joined: 21 Aug 2011 |
| Total Posts: 8265 |
|
|
| 15 Oct 2015 06:32 PM |
it is welded to the head.
below is the activation function. it disables the shoulder motor6ds
function ActivateArms() local w1,w2=character['Right Arm']:FindFirstChild'Weld'or Instance.new('Weld',character['Right Arm']),character['Left Arm']:FindFirstChild'Weld'or Instance.new('Weld',character['Left Arm']) local s1,s2=torso:WaitForChild'Right Shoulder',torso:WaitForChild'Left Shoulder' w1.Part0=w1.Parent; w2.Part0=w2.Parent w1.Part1=head; w2.Part1=head s1.Part1=nil; s2.Part1=nil w1.C0=CFrame.new(1.5,1.5,0); w2.C0=CFrame.new(-1.5,1.5,0) w1.C1=RightPos; w2.C1=LeftPos equipped=true runserv:BindToRenderStep('ArmUpdate',Enum.RenderPriority.Camera.Value,function() local x,y,z,r1,r2,r3,r4,r5,r6,r7,r8,r9=camera.CoordinateFrame:components() neck.C0=CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)*CFrame.Angles(math.asin(r6),0,0) end) end
|
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 15 Oct 2015 06:43 PM |
not sure what neck is
Red Blossoms |
|
|
| Report Abuse |
|
|
lostend
|
  |
| Joined: 21 Aug 2011 |
| Total Posts: 8265 |
|
|
| 15 Oct 2015 06:45 PM |
| neck is neck motor located in torso |
|
|
| Report Abuse |
|
|
lostend
|
  |
| Joined: 21 Aug 2011 |
| Total Posts: 8265 |
|
| |
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 15 Oct 2015 07:18 PM |
idk i just welded them to the head and change the weld's c0 not the neck's c0
Red Blossoms |
|
|
| Report Abuse |
|
|
lostend
|
  |
| Joined: 21 Aug 2011 |
| Total Posts: 8265 |
|
|
| 15 Oct 2015 07:30 PM |
can u post what you did?
you created a new weld instead of the neck weld, and used that instead? |
|
|
| Report Abuse |
|
|
lostend
|
  |
| Joined: 21 Aug 2011 |
| Total Posts: 8265 |
|
|
| 15 Oct 2015 07:36 PM |
local neck=Instance.new('Weld',character.Torso); neck.Name='FakeNeck'; neck.Part0=head; neck.Part1=torso; neck.C0=CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)
replaced my neck variable with that. didnt seem 2 work |
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 15 Oct 2015 07:43 PM |
rayk isnt this your specialty lmao
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|
|
|
| 15 Oct 2015 07:53 PM |
| I bet you rayk knows, he is just you know... |
|
|
| Report Abuse |
|
|
lostend
|
  |
| Joined: 21 Aug 2011 |
| Total Posts: 8265 |
|
| |
|
Pinkerten
|
  |
| Joined: 03 Aug 2014 |
| Total Posts: 840 |
|
|
| 15 Oct 2015 08:43 PM |
Your changing the wrong variable, your math is right (technically but its god awful, (COMPARED to how much you actually know about cframe))
Anyway your Rotating AROUND the placement of the weld (c0), when you should be rotating around the camera, which is pretty darn close to the head, so what I would do is create an ENTIRE new weld and weld that to the head, and either ONLY change the C0 and leave the C1 nothing, or ONLY change the C1 and leave the C0 nothing |
|
|
| Report Abuse |
|
|
lostend
|
  |
| Joined: 21 Aug 2011 |
| Total Posts: 8265 |
|
|
| 15 Oct 2015 09:01 PM |
Ok I did that, but it's stuttery.
local client=game.Players.LocalPlayer local char=client.Character local cam=workspace.CurrentCamera
local torso=char.Torso local head=char.Head
local w=Instance.new('Weld',head) w.Part0=torso w.Part1=head w.C1=head.CFrame:toObjectSpace(torso.CFrame)
local runserv=game:service'RunService' local m=client:GetMouse() m.TargetFilter=char
local right=char:WaitForChild'Right Arm' local left=char:WaitForChild'Left Arm'
local w1,w2=Instance.new('Weld',right),Instance.new('Weld',left) w1.Part0=w1.Parent w2.Part0=w2.Parent w1.Part1=head w2.Part1=head
w1.C0=CFrame.new(-1.5,-1.5,0)*CFrame.Angles(math.pi/2,0,0) w2.C0=CFrame.new(1.5,-1.5,0)*CFrame.Angles(math.pi/2,0,0) runserv:BindToRenderStep('Arms',Enum.RenderPriority.Camera.Value,function() w.C1=CFrame.new(head.CFrame.p,m.Hit.p):toObjectSpace(torso.CFrame) right.LocalTransparencyModifier=0 left.LocalTransparencyModifier=0 end) |
|
|
| Report Abuse |
|
|
Pinkerten
|
  |
| Joined: 03 Aug 2014 |
| Total Posts: 840 |
|
|
| 15 Oct 2015 09:09 PM |
| Okay when I said your math was bad, I ment that using CFrame.Angles was, I mean if you know that much about CFrame I would use a diffrent method. I dont know if your current method or your other one was better or not. |
|
|
| Report Abuse |
|
|
lostend
|
  |
| Joined: 21 Aug 2011 |
| Total Posts: 8265 |
|
|
| 16 Oct 2015 06:41 AM |
help me11111
works but its stuttery af |
|
|
| Report Abuse |
|
|
Pinkerten
|
  |
| Joined: 03 Aug 2014 |
| Total Posts: 840 |
|
|
| 16 Oct 2015 06:22 PM |
| well idk what u maen by sdtyudfderyu |
|
|
| Report Abuse |
|
|
lostend
|
  |
| Joined: 21 Aug 2011 |
| Total Posts: 8265 |
|
| |
|
lostend
|
  |
| Joined: 21 Aug 2011 |
| Total Posts: 8265 |
|
| |
|