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: Positioning 2d based on 3d

Previous Thread :: Next Thread 
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
13 Jul 2015 07:10 AM
any suggestions?
I tried Torso.CFrame:vectorToObjectSpace(Part.Position) and same with Camera.CoordinateFrame...
then I did
v.Position = UDim2.new(.5 + (x(X Axis of gotten vectorToObjectSpace) / distX(250)) - (v.Size.X.Scale / 2), 0, .5 + (z(Z Axis of gotten vectorToObectSpace) / distZ(300)) - (v.Size.X.Scale / 2), 0)
it was all goin good, it fixed the idiotic rotation problem I had (of course I had to remove the idiotic 'Frame.Rotation = Torso.Rotation.Y' I don't even know why people recommended this stupid method to me -_- so I know it's defo not as efficient as just rotating the whole frame, but hey, I gotta rotate everything somehow!)
but anyways, the Position doesn't work, and if I walk past the parts then it shows that am still walking towards them :/

"My Life is going Good... but..."
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
13 Jul 2015 07:12 AM
you should get on skype
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
13 Jul 2015 07:13 AM
oh k XD I had it off since I wanted to speed things up since my computer was slow from me keeping it on Sleep all the time :/

"My Life is going Good... but..."
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
13 Jul 2015 08:56 AM
bump

"My Life is going Good... but..."
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
13 Jul 2015 10:21 AM
I now tried
local x = (char.Torso.Position - v.Position).X
local z = (char.Torso.Position - v.Position).Z
and the Position now work like a charm, but now there is a problem with the rotating :/ any help plzzz!?

"My Life is going Good... but..."
Report Abuse
Stefan631 is not online. Stefan631
Joined: 23 Dec 2010
Total Posts: 1350
13 Jul 2015 10:43 AM
http://wiki.roblox.com/index.php?title=API:Class/Camera/WorldToScreenPoint
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
13 Jul 2015 10:48 AM
hmmm... are u 100% sure this will work? o.O
are the X an Z numbers bigger than 1 or are they always 1 or -1?

"My Life is going Good... but..."
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
13 Jul 2015 11:05 AM
did
local x = cam:WorldToScreenPoint(v.Position).X
local z = cam:WorldToScreenPoint(v.Position).Z
not what I want -_-
this just gives u the approxamite position of the Vector3 on ur screen :P I said I'm making a RADAR :P 2 different things -_-

"My Life is going Good... but..."
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
13 Jul 2015 11:27 AM
nvm -_-
pointToObjectSpace was then answer

"My Life is going Good... but..."
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