Cawlonee
|
  |
| Joined: 03 Mar 2014 |
| Total Posts: 2687 |
|
|
| 17 Mar 2014 11:37 PM |
I'm interested if there is someway to find where a part is on the screen/in the camera view.
Say I wanted to make a little GUI go to the location of a part on a screen. Is it possible? |
|
|
| Report Abuse |
|
|
|
| 17 Mar 2014 11:39 PM |
| Possibly. You might want to look into :GetPlayerMouse on the Roblox Wiki |
|
|
| Report Abuse |
|
|
Cawlonee
|
  |
| Joined: 03 Mar 2014 |
| Total Posts: 2687 |
|
|
| 17 Mar 2014 11:43 PM |
I know what that method is/does.
I don't even think that is relevant to what I'm asking. The mouse has nothing to do with it. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 18 Mar 2014 12:06 AM |
| You could make use of Mouse.Target in the Mouse.Move event and set the position to Mouse.X Mouse.Y |
|
|
| Report Abuse |
|
|
Cawlonee
|
  |
| Joined: 03 Mar 2014 |
| Total Posts: 2687 |
|
|
| 18 Mar 2014 12:24 AM |
You don't understand.
I'm not moving it to where the mouse is...
I'm moving it to where a part is on the screen.
Nothing to do with the mouse axes. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 18 Mar 2014 12:25 AM |
| I'm assuming this is a regular screen GUI in PlayerGui where you want a frame or button or w/e to be positioned locally where the part is? If it's hovering over a part? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 18 Mar 2014 12:26 AM |
| Or you want to like, clone a surfaceGUI/billboardGUI to the part? |
|
|
| Report Abuse |
|
|
Cawlonee
|
  |
| Joined: 03 Mar 2014 |
| Total Posts: 2687 |
|
|
| 18 Mar 2014 12:27 AM |
Yes.
It would just be a ScreenGui with a few elements inside.
But more specifically, I want to know if it is possible to get the location of a part on someone's screen. I can do the GUI moving and such myself. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 18 Mar 2014 12:29 AM |
Mouse.Target.Hit.p returns the Position (.Hit alone returns the CFrame) of the part the mouse if over. Mouse.Target is the actual part itself.
So you would want to put the GUI in Mouse.Target (and set adornee to the part) or do you want the position of the part in basically "screen" (2D) coordinates? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
Cawlonee
|
  |
| Joined: 03 Mar 2014 |
| Total Posts: 2687 |
|
|
| 18 Mar 2014 12:32 AM |
I'm not looking for what part the mouse is hovering over, I'm talking about the second thing you mentioned.
I want to know if it's possible to get the position of the part in 2D coordinates on the screen.
Like where on the axes.
When I rotate the camera, this should change; Doesn't matter where the mouse is. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 18 Mar 2014 12:34 AM |
| It's going to require some math and usage of AbsoultePosition and AbsoluteSize, if everyone had the same size screen then this would be must easier. |
|
|
| Report Abuse |
|
|
Cawlonee
|
  |
| Joined: 03 Mar 2014 |
| Total Posts: 2687 |
|
|
| 18 Mar 2014 12:34 AM |
Damn, I'd probably have to use some sort of Local Billboard GUI.
Ehh, too much work.
//Give up |
|
|
| Report Abuse |
|
|