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: Part Location on Screen?

Previous Thread :: Next Thread 
Cawlonee is not online. 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
Orlando777 is not online. Orlando777
Joined: 25 Jul 2008
Total Posts: 254
17 Mar 2014 11:39 PM
Possibly. You might want to look into :GetPlayerMouse on the Roblox Wiki
Report Abuse
Cawlonee is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
18 Mar 2014 12:31 AM
is over*
Report Abuse
Cawlonee is not online. 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 is not online. 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 is not online. 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
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