Jump to content

TargetCamera setTarget while upside down


Eelis
 Share

Recommended Posts

Hi @Eelis and welcome.  http://playground.babylonjs.com/#IU2XB#1

It was caused by the x-value for your camera in line 6.  I set it to zero... it lined up again.

Why it's doing that?  I dunno.  Still to be answered... by smarter people than I.  :)

I think something is goofy with camera.upVector.... but, not sure.  Sorry for the slow reply.

Link to comment
Share on other sites

Yes, I agree, but I'm not really an expert, so my agreement carries very little weight.  :)  If I were to guess... I would say that the camera.upVector is only doing a 90-degree rotate, and should be doing a 180.  But that's truly a guess. 

We could go hacking...  examining source code, see if we can find the trouble.  I will need more coffee, first.  :)  If you can wait just a little while longer, the "big dogs" will return from weekend partying, see this, and perhaps instantly know what is causing it. 

Good find, E!  Interesting.  There is definitely something odd, there.

Update:  Tried...  camera.upVector = BABYLON.Vector3.Up().negate();  no change.  Feeling around in the dark is fun, though.  Seven occurrences of upVector  in https://github.com/BabylonJS/Babylon.js/blob/master/src/Cameras/babylon.camera.js .  I smell the problem.  You?  It smells like my dog has been in here chewing on things.  :D

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