Jump to content

Converting 3D vertex to 2D point on screen


joshcamas
 Share

Recommended Posts

@bulisor  Thanks for the reply . Yes I understand if canvas size doesn't match window size , it will create the problem. In that case we have to use offset property of the canvas to find canvas's position in the page/screen and add that to the resulting x and y from project function.  

 

@deltakosh  sorry for kind of wasting time. But I did nothing and now it is just working fine. I literally did nothing. I was debugging earlier and I've shown here the output values. But last night it was working all fine.

Link to comment
Share on other sites

  • 8 months later...
  • 8 months later...

Sorry to dig up the past, but I am having trouble with this... I keep getting NAN on the output for the x and y and like 0.99128973981728937 for the z no matter what I do...

Also the example at http://www.babylonjs-playground.com/#UWSIL outputs NAN as well to the console, so me thinks something is not working correct.

@Deltakosh #Bug?
 

Nevermind got the fix!

ok why do we need to pass the width and height when we were already passing the engine in the old version which has this information?  I feel like more lines in a constructor why?

Just wondering why things changed?

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...