Jump to content

Getting uv coordinates with picking collisions


Gugis
 Share

Recommended Posts

Does PickingInfo object returns uv coordinates of picked point? I thought properties bu and bv is uv coordinates, but it doesn't seems like it. I need this for terrain texturing tool I'm making. Maybe you guys have any ideas?

Link to comment
Share on other sites

  • 11 months later...

Wow, took you a while to answer :-) 

 

Those are the UV coordinates of the picked point. With those two values you can find the relative position on the image set as texture. It is a number between 0 and 1 which corresponds to the width/height of the image in the same way percentage corresponds to it - 0 is 0 % of the width or height, 1 is 100% of the width or height.

 

So, if you have those texture coordinates : (0.4 , 0.5) and the texture is 200x200, the position on the image would be (80, 100).

 

You can read more about UV mapping here - https://en.wikipedia.org/wiki/UV_mapping

Link to comment
Share on other sites

Wow, took you a while to answer :-) 

 

Those are the UV coordinates of the picked point. With those two values you can find the relative position on the image set as texture. It is a number between 0 and 1 which corresponds to the width/height of the image in the same way percentage corresponds to it - 0 is 0 % of the width or height, 1 is 100% of the width or height.

 

So, if you have those texture coordinates : (0.4 , 0.5) and the texture is 200x200, the position on the image would be (80, 100).

 

You can read more about UV mapping here - https://en.wikipedia.org/wiki/UV_mapping

Nope, those are coordinates of point in triangle.

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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...