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 » Scripters
Home Search
 

Re: Simple 2D Gui point to 3D lookvector

Previous Thread :: Next Thread 
PlaceRebuilder is not online. PlaceRebuilder
Joined: 29 Apr 2008
Total Posts: 1056
24 Mar 2015 08:14 PM
I need what the title describes.
It's super difficult and annoying trying to compensate because the aim is 90 pixels above screen center.

SERIOUSLY, 90 Pixels abovethe center and it's giving me a headache.
Can anyone give me the correct 3D lookvector for the screenpoint: UDim2.new(0.5,0,0.5,-90)?

Don't give me stravant's screenspace module, that stuff is just nonsense.
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
24 Mar 2015 08:16 PM
Here

http://www.roblox.com/games/216089799/Radar


Also didn't notice you made r2d until now
Report Abuse
PlaceRebuilder is not online. PlaceRebuilder
Joined: 29 Apr 2008
Total Posts: 1056
24 Mar 2015 08:18 PM
Don't advertise ur game on my posts. That stuff is not even uncopylocked.
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
24 Mar 2015 08:18 PM
Click the three dots
and then click edit
I wasn't advertising..
Report Abuse
PlaceRebuilder is not online. PlaceRebuilder
Joined: 29 Apr 2008
Total Posts: 1056
24 Mar 2015 08:18 PM
Nvm, roblox new website layout is bloxing confusing.
Report Abuse
PlaceRebuilder is not online. PlaceRebuilder
Joined: 29 Apr 2008
Total Posts: 1056
24 Mar 2015 08:22 PM
-.-

I forgot to mention, using Mouse.Hit.p is NOT an option.
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
24 Mar 2015 08:25 PM
op is an dumi head

Couldn't you ray cast from the cam origin?
Report Abuse
PlaceRebuilder is not online. PlaceRebuilder
Joined: 29 Apr 2008
Total Posts: 1056
24 Mar 2015 08:27 PM
And in what direction are you supposing I ray cast?
RAYCASTING has NOTHING to do with the problem at all!

You are a special kind of dumi head.
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
24 Mar 2015 08:30 PM
It probably isn't 90 pixels for all clients, convert that scale for your screen (90/ScreenGui.AbsoluteSize.Y).

From there it's just trig based on the camera's FOV

lookvector = camera.lookVector*CFrame.Angles(math.rad((90/ScreenGui.AbsoluteSize.Y)*camera.FieldOfView),0,0)
Report Abuse
PlaceRebuilder is not online. PlaceRebuilder
Joined: 29 Apr 2008
Total Posts: 1056
24 Mar 2015 08:42 PM
Ty. Tyvm Casualist! It works!
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
24 Mar 2015 08:49 PM
Glad it works!
Report Abuse
DrMathematica is not online. DrMathematica
Joined: 29 Aug 2008
Total Posts: 27268
24 Mar 2015 09:03 PM
Seriously guys,

http://wiki.roblox.com/index.php?title=API:Class/Camera/ScreenPointToRay

This exists for that exact thing.
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
24 Mar 2015 09:04 PM
didnt know that existed
thanks dr
Report Abuse
newslate is not online. newslate
Joined: 10 Jun 2014
Total Posts: 217
24 Mar 2015 09:07 PM
we don't need your sass here, op
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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