|
| 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 |
|
|
|
| 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 |
|
|
|
| 24 Mar 2015 08:18 PM |
| Don't advertise ur game on my posts. That stuff is not even uncopylocked. |
|
|
| Report Abuse |
|
|
|
| 24 Mar 2015 08:18 PM |
Click the three dots and then click edit I wasn't advertising.. |
|
|
| Report Abuse |
|
|
|
| 24 Mar 2015 08:18 PM |
| Nvm, roblox new website layout is bloxing confusing. |
|
|
| Report Abuse |
|
|
|
| 24 Mar 2015 08:22 PM |
-.-
I forgot to mention, using Mouse.Hit.p is NOT an option. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 24 Mar 2015 08:42 PM |
| Ty. Tyvm Casualist! It works! |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
| |
|
|
| 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 |
|
|
|
| 24 Mar 2015 09:04 PM |
didnt know that existed thanks dr |
|
|
| Report Abuse |
|
|
newslate
|
  |
| Joined: 10 Jun 2014 |
| Total Posts: 217 |
|
|
| 24 Mar 2015 09:07 PM |
| we don't need your sass here, op |
|
|
| Report Abuse |
|
|