Jump to content

Position camera Y and target.getFrontPosition()


Dad72
 Share

Recommended Posts

When I use target.getFrontPosition (), there seems to be a problem depending on the height of the camera. When the camera is high, the value 'Y' of getFrontPosition () is low rather than being at the same height as the camera.

View on the playground. You can see the sphere below 0 and the camera above zero. in X and Z, it works perfectly well.

http://www.babylonjs-playground.com/#1FQZ8T#0

 

<fr> Au cas ou mon explication en anglais ne serait pas bonne.

Lorsque j'utilise target.getFrontPosition(), il semble y avoir un probleme suivant la hauteur de la camera. Plus la camera est haute, plus la valeur en Y de getFrontPosition() est basse au lieux de ce retrouver à la même hauteur que la camera.

Voir sur le playground. on peut voir la sphère en dessous de 0 et la camera au dessus de zéro. en X et Z, cela fonctionne parfaitement bien.

</fr>

 

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