crossbar
|
  |
| Joined: 08 Dec 2009 |
| Total Posts: 2817 |
|
|
| 24 Nov 2017 12:42 PM |
For instance, in my FPS script, I have everything working fine but there's one problem, which is that when I rotate the shoulder with an offset from the head of 1 for the y-value.
It looks like this when it's rotating:
<-------^-------->, basically it is rotating with 1 stud as its radius around the fixed point which makes my arm look ballistic and like it's got an air gap in between the shoulder and the arm.
I just want the shoulder to rotate like it would on a normal human without having to deal with such huge gaps because of the offset I welded the arms to the head.
If anyone can help with me with this, it would be really greatly appreciated. Thanks! |
|
|
| Report Abuse |
|
|
crossbar
|
  |
| Joined: 08 Dec 2009 |
| Total Posts: 2817 |
|
| |
|
crossbar
|
  |
| Joined: 08 Dec 2009 |
| Total Posts: 2817 |
|
|
| 24 Nov 2017 12:58 PM |
| Please help me with this, I may even donate generously to someone who can help me solve this. |
|
|
| Report Abuse |
|
|
crossbar
|
  |
| Joined: 08 Dec 2009 |
| Total Posts: 2817 |
|
| |
|
Quasiduck
|
  |
| Joined: 28 Sep 2008 |
| Total Posts: 2437 |
|
|
| 24 Nov 2017 03:49 PM |
| https://forum.roblox.com/Forum/ShowPost.aspx?PostID=227256120 |
|
|
| Report Abuse |
|
|
crossbar
|
  |
| Joined: 08 Dec 2009 |
| Total Posts: 2817 |
|
|
| 24 Nov 2017 09:18 PM |
| Thanks Quasi, but would this work with welds as well? |
|
|
| Report Abuse |
|
|
Quasiduck
|
  |
| Joined: 28 Sep 2008 |
| Total Posts: 2437 |
|
|
| 25 Nov 2017 06:07 AM |
Yes.
Though the axis will be in the object space of Part0 I believe.
You can switch between object space and world space using toWorldSpace and toObjectSpace. |
|
|
| Report Abuse |
|
|
crossbar
|
  |
| Joined: 08 Dec 2009 |
| Total Posts: 2817 |
|
|
| 25 Nov 2017 01:09 PM |
Sorry, but I did this:
rightArmWeld.C0 = rotateAboutAxis(rightArmWeld.C0:toObjectSpace(rightArmWeld.Part0.CFrame), rightArmWeld.Part0.Position, rightArmWeld.Part0.CFrame.lookVector, math.rad(i))
With the right arm welded to the head, and the arm just started rotating like crazy around the head. I know i'm probably doing something wrong, so could you tell me what exactly I need to put into the parameters of your function to work?
Thank you! |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2017 01:31 PM |
| math.pi is very useful in this situation. |
|
|
| Report Abuse |
|
|