Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
|
| 28 Jun 2013 02:20 PM |
| When a gun is equipped, how to get it to follow where your mouse is pointing? Like in Deadzone for example. |
|
|
| Report Abuse |
|
|
makerror
|
  |
| Joined: 29 Aug 2011 |
| Total Posts: 493 |
|
|
| 28 Jun 2013 02:25 PM |
| bump, This is interesting for me too |
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
| |
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
| |
|
DrWaffler
|
  |
| Joined: 16 Sep 2011 |
| Total Posts: 4248 |
|
|
| 30 Jun 2013 07:43 PM |
| I'm by no means advanced in scripting, but I know it would involve CFrame, and using where your mouse is looking for references. Interesting question, but I'm not sure this is the place to ask. |
|
|
| Report Abuse |
|
|
lejam7890
|
  |
| Joined: 04 Jun 2009 |
| Total Posts: 3594 |
|
|
| 30 Jun 2013 07:44 PM |
| Don't ask for a script, MAKE IT YOURSELF. Maybe even get a deadzone copy and look at the guns to help get your "reference" |
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
|
| 30 Jun 2013 08:18 PM |
| I'm not asking for a script, I'm asking how I would go about making a certain portion of one. |
|
|
| Report Abuse |
|
|
Voidion
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 2668 |
|
|
| 30 Jun 2013 08:35 PM |
I think it could be done through the Move event http://wiki.roblox.com/index.php/Move |
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
|
| 30 Jun 2013 08:49 PM |
| Ahh... okay. Any insight on how I would actually CFrame the gun? I figured I'd use the Move event, but I don't know what to perform once the mouse has moved. |
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
| |
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
| |
|
Riderj
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 1534 |
|
|
| 02 Jul 2013 12:07 PM |
This is difficult because it's translating 2D Space into 3D space, this might be helpful but I don't know, not much documentation on it.
http://wiki.roblox.com/index.php/UnitRay_(Property) |
|
|
| Report Abuse |
|
|
jasondee1
|
  |
| Joined: 26 Jul 2008 |
| Total Posts: 8002 |
|
|
| 02 Jul 2013 12:12 PM |
If you want something easy, go for a "third person camera-lock" script Which gives that over-the-shoulder shooter camera. Its easier. |
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
|
| 03 Jul 2013 09:42 PM |
| I'll try that Rider. Jason, I was looking to make it a FPS, so I would rather not do that. |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2013 09:44 PM |
| Trigonometry, Pythagoras theorem and CFrame. |
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
|
| 03 Jul 2013 11:10 PM |
| Would you be able to assist me further? |
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
| |
|
|
| 04 Jul 2013 11:36 PM |
| Oh god, we all would love this script. It is called mouse rotation. I too am trying to find one. |
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
|
| 06 Jul 2013 10:10 PM |
| Well, lemme know if you find one please. |
|
|
| Report Abuse |
|
|
|
| 06 Jul 2013 10:12 PM |
| mouse.Hit.p, offset all of the gun parts accordingly to where they are on the gun. |
|
|
| Report Abuse |
|
|
Ekkoh
|
  |
| Joined: 22 Oct 2012 |
| Total Posts: 524 |
|
|
| 08 Jul 2013 09:11 PM |
| It should be simpler if it's a mesh, right? Just one single part. |
|
|
| Report Abuse |
|
|