Neverfly
|
  |
| Joined: 07 Jan 2009 |
| Total Posts: 234 |
|
|
| 16 Aug 2009 03:09 PM |
Yeah, you know how Ana made an object follow the mouse in his game Tunnel Cruiser? Well how did he do this?
This is my script:
script.Parent.Selected:connect(function(mouse) print("Test Tool Selected")
mouse.KeyDown:connect(function(key) if key then if key == "a" then while true do wait() local a = mouse.Origin workspace.Test.CFrame = CFrame.new(workspace.Test.Position, Vector3.new(a)) end end end end) end)
? |
|
|
| Report Abuse |
|
|
zac352
|
  |
| Joined: 20 Feb 2009 |
| Total Posts: 4657 |
|
| |
|
Neverfly
|
  |
| Joined: 07 Jan 2009 |
| Total Posts: 234 |
|
| |
|
zac352
|
  |
| Joined: 20 Feb 2009 |
| Total Posts: 4657 |
|
| |
|
Neverfly
|
  |
| Joined: 07 Jan 2009 |
| Total Posts: 234 |
|
|
| 16 Aug 2009 03:16 PM |
ER, You lost me, What does the Camera have anything to do with this?
|
|
|
| Report Abuse |
|
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
| |
|
zac352
|
  |
| Joined: 20 Feb 2009 |
| Total Posts: 4657 |
|
| |
|
zac352
|
  |
| Joined: 20 Feb 2009 |
| Total Posts: 4657 |
|
| |
|
Neverfly
|
  |
| Joined: 07 Jan 2009 |
| Total Posts: 234 |
|
|
| 16 Aug 2009 03:28 PM |
| Thats nice for a GUI later, but Im loking for something that simply follows your mouse, not your camera from a certain vector. |
|
|
| Report Abuse |
|
|
Wyoming
|
  |
| Joined: 05 Feb 2008 |
| Total Posts: 8453 |
|
|
| 16 Aug 2009 06:44 PM |
Wrong, screen pos.
mouse.(X/Y)/mouse.ViewSize(X/Y) Then calculate. |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 16 Aug 2009 08:02 PM |
My Y is like 0.65 to -0.65 and my X is like 1.1 to -1.1
X: 2.2 Y: 1.3 |
|
|
| Report Abuse |
|
|
Wyoming
|
  |
| Joined: 05 Feb 2008 |
| Total Posts: 8453 |
|
|
| 16 Aug 2009 08:28 PM |
| Should equally range from 0,0 (Top left) to 1,1 (Bottom right) when divided. |
|
|
| Report Abuse |
|
|