|
| 12 Jul 2014 04:24 PM |
So, this is what i need: say you are facing right, and you are holding the gun straight in front of you: I want the gun to go up and down, depending on if your mouse is above him or below him. I dont want it to be aiming at the ground where I put cursor. This probably makes no sense, but if you have ever played "zombotron2" Then you should know what i mean. |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 04:27 PM |
| I would pay 100-200 robux if someone made one for me based off of the game zombotron2. |
|
|
| Report Abuse |
|
|
| |
|
|
| 12 Jul 2014 04:31 PM |
How so? Just say it i will fix it if i can. |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 04:34 PM |
http://www.roblox.com/Late-Forums-place?id=164846628
This is the only place that it'll be allowed in. Make sure you press the "Help request" button when posting. |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 04:35 PM |
This is a scripting problem, and I post all of my stuff here, and never ran into any issues... whatever. |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 04:36 PM |
| I will not play that game. I am requestion help here and offering pay for it. |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 04:43 PM |
| Not really a scripting problem without a script lol |
|
|
| Report Abuse |
|
|
| |
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
| |
|
|
| 12 Jul 2014 06:42 PM |
Hey MHebes, so you know our 2d script thing? I have restricted the player to only moving left and right, up and down, but now im trying to add guns. I need a way for the gun to shoot forward, but change up and down based on the height of your cursor. |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 06:43 PM |
http://www.roblox.com/shoot-zombies-in-2d-place?id=162455822
>.< |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 06:50 PM |
| Guys, he whens where the gun faces the same way but follows the cursor and only does 180 degrees. |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 12 Jul 2014 08:12 PM |
| If someone can tell me how to project a Vector3 on to the screen and get a Vector2, I could do this I think. |
|
|
| Report Abuse |
|
|
| |
|
|
| 12 Jul 2014 08:41 PM |
You're not going to get a 2D gun for 100 robux, that's a very difficult thing to make.
★ +2k posts || R$1,153,796 ★ |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 12 Jul 2014 08:53 PM |
Eh, I've done more for free... http://www.roblox.com/Watch-of-Power-item?id=165930484
was made because someone asked me to lol |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 11:08 PM |
Now offering 500 to anyone, and 1000 to MHebes becasue he has helped so much. I may have an answer one second... |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 11:10 PM |
MHebes, ArbiterofDeath said:
I think what you are looking for is the mouse.X and the mouse.Y properties. If not then try this:
local function getVector2(camera, vector3) vector3 = camera.CoordinateFrame:Inverse() * vector3 return Vector2.new(vector3.x, vector3.y) end |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 11:15 PM |
If you want the gun to point towards the mouse, you can so something similar to:
function rotateGun() local mousePos = Vector2.new(mouse.X,mouse.Y) local gunPos = --Vector2 position local localPos = (mousePos-fishPos).unit rot = math.atan2(localPos.Y,localPos.X) local rotation = math.deg(rot) return rotation end
Alt. of Jetta765214 |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 11:16 PM |
LegendaryAccount, That gun is exactly what i am looking for. |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 11:18 PM |
Jetta I will try that. Also, i saw above someone paraphrase what I said quite well. where the gun faces the same way but follows the cursor and only does 180 degrees |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 12 Jul 2014 11:21 PM |
No I get exactly what you mean, I'm working on it now.
Jetta,
"local gunPos = --Vector2 position" That position is the problem. It's a 3D game that he's made look 2D - we need a function that can figure out where the gun is in 2D
"local localPos = (mousePos-fishPos).unit" Fishes have no place here lol |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 11:24 PM |
Ya, I made a fish game where the fish points toward the mouse for a person, so I just copied and pasted... Thought I had changed all the variables to gun.
Anyway, it's not that hard to transfer the rotation number into a 3d rotation
gun.CFrame = gun.CFrame*CFrame.Angles(rotation,0,0)
if rot is radians that is, and it is rotated around the correct axis.
Alt. of Jetta765214 |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2014 11:32 PM |
http://www.roblox.com/Late-Forums-place?id=16484662
check the owner's badges |
|
|
| Report Abuse |
|
|