generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: How do you move a gun up/down in first person?

Previous Thread :: Next Thread 
ryry99 is not online. 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
Jellyfish403 is not online. Jellyfish403
Joined: 12 May 2010
Total Posts: 951
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 is not online. 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
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
28 Oct 2012 10:32 PM
MAKE YOUR OWN ENGINE
Report Abuse
Awesomeness4000 is not online. Awesomeness4000
Joined: 09 Jul 2010
Total Posts: 459
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 is not online. 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 is not online. 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
veerstrong is not online. veerstrong
Joined: 23 Jun 2009
Total Posts: 2450
01 Nov 2012 01:32 AM
MOTORS IN BOTH ARMS
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
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
Jellyfish403 is not online. Jellyfish403
Joined: 12 May 2010
Total Posts: 951
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
Jellyfish403 is not online. Jellyfish403
Joined: 12 May 2010
Total Posts: 951
01 Nov 2012 12:25 PM
^That method is incorrect let me further research solving SSS triangles.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image