Jump to content

convert world point to screen 2D point using specific camera


Recommended Posts

Thanks @jellix for your answer, but I need to convert 3D-vector to 2D position,

I found this way to do that :

 let p = BABYLON.Vector3.Project(vector, Identity, scene.getTransformMatrix(),
                    camera.viewport.toGlobal(engine.getRenderWidth(), engine.getRenderHeight()));


But I don't know how to modify it to convert the vector according to specific camera, I tried to change the camera view port but it dose not change anything as shown in the playground.

if anyone can explain the parameters it will be a good help, Thanks.

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.

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.


  • Recently Browsing   0 members

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