ryry99
|
  |
| Joined: 13 Apr 2008 |
| Total Posts: 403 |
|
|
| 28 Oct 2012 08:32 PM |
| I'm making my first gun, I know all the shooting stuff, but I haven't figured a way to move the gun up or down in first person. Anyone know of an smooth, efficient way to do it? |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2012 08:41 PM |
| I don't know how to actually do it but I do know that the arm weld and wait(1/30) will help. |
|
|
| Report Abuse |
|
|
ryry99
|
  |
| Joined: 13 Apr 2008 |
| Total Posts: 403 |
|
|
| 28 Oct 2012 10:30 PM |
| Bump, I need a method on how to do this. Someone please help. |
|
|
| Report Abuse |
|
|
| |
|
|
| 28 Oct 2012 10:34 PM |
Ry one of the reasons people will probably not do this is because it is complicated any very buggy. You will have to learn Welding, Mouse location, and stuff like that. You will also have to stop it when it gets to a certain point or else your arms will go backwards... |
|
|
| Report Abuse |
|
|
Neo1035
|
  |
| Joined: 25 Jun 2008 |
| Total Posts: 13076 |
|
|
| 28 Oct 2012 11:59 PM |
| Awesomeness, that doesn't answer the question though |
|
|
| Report Abuse |
|
|
ryry99
|
  |
| Joined: 13 Apr 2008 |
| Total Posts: 403 |
|
|
| 01 Nov 2012 01:26 AM |
| Awesomeness, like Neo said, I am looking for an answer, not just telling me it's hard and complicated. One of the main reasons why I'm doing it is because it's hard and complicated. |
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Nov 2012 01:33 AM |
Just learn from redditor's code, it's open source. WARNING BOSS CODE:
http://www.roblox.com/Untitled-Sandbox-Shooter-by-Redditor-OPEN-SOURCE-place?id=75503168 |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2012 06:22 AM |
Again, this might not tell you exactly how. Lets say we put a triangle in front of our character: The adjacent side is the distance between the player's arm and the default vector in which he looks. The hypotenuse is the distance between the player's arm and the vector in which he is ACTUALLY looking. We have a triangle! We know what the side lengths of the triangle are, and we need to get the ratio between the adjacent and hypotenuse. What function lets us do this? Cosine! Take the length of the adjacent side (a), and the hypotenuse's length (b), and divide! (c = a/b) Now we want to convert this ratio into radians. What function lets us do this? Arccos! Simply use the function that ROBLOX provides as follows: c = acos(c) This should give you the number at which you should rotate the arm. How to do the actual rotation? I am not sure but I think you can figure it out. Reply if this helped. |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2012 12:25 PM |
| ^That method is incorrect let me further research solving SSS triangles. |
|
|
| Report Abuse |
|
|