Jump to content

GetPosition return unit ?


tumira
 Share

Recommended Posts

I'm a bit confused about the return unit ?

 

For example I set the camera at the editor at this position. x=0.0 , y=77, z=-27.0.

 

 

When I use this code on the camera to get the z position,

 

"self.entity:GetPosition().z"

 

it returns -0.27 ? I need to multiply my position from codes to 100 to get the exact same value with the editor?

Link to comment
Share on other sites

It made more sense to use centimeters in the Editor when creating CSG as it would be easier to texture with common texture sizes (256, 512, etc instead of 2.56, 5.12, etc). The engine position related commands use or return meters.

  • Upvote 1

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Why not just returns all unit in centimeters (code and editor) ? So it will standardize. I've been converting my Unity project and I noticed that Leadwerks value is way off. Turns out it returns value differently from the editor(cm and m).

 

Its not a big problem, I just need to multiple the value that I got from codes to 100 to get it the same with the editor. But still In my opinion kinda odd to why not make it a standard for both editor and codes.

 

Maybe to avoid breaking stuff up with current project ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...