Jump to content

Panning the camera moves the whole scene except for the mesh that the camera is focused on.


MacSkelly
 Share

Recommended Posts

So I'm not sure if this is a bug or maybe I've just not configured the camera correctly. I have a scene that's the interior of a building and the interior is made of a bunch of room meshes joined together. I have it so that when you click on a room the camera sets that room mesh as its target. If I try to pan the camera(ctrl and mouse drag) after clicking on a room the whole interior pans except for the room that I clicked on which stays in the centre of the screen, separated from the rest of the rooms. Any way to remedy this?

I'm using an ArcRotateCamera by the way.

Example of what I mean: http://www.babylonjs-playground.com/#18KHF6#0

Click on sphere2 and then pan the camera (ctrl and mouse drag).

Link to comment
Share on other sites

Hi MS, good to see you again.

   Yeah, something is toasted, somewhere, here.  Rodents... chewing on the framework, I suspect.  ;)

http://www.babylonjs-playground.com/#18KHF6#1

I tried two different methods of keeping sphere2.position locked-in-place, and failed.

In my past experience, when an ArcCamera has a set target, control-dragging got disabled.

See:  https://github.com/BabylonJS/Babylon.js/commit/725298b717773e271b1256bca45a96db8159cdf2#diff-c5e36d2c529e0623cfb58b616c79943fL15173

Looks like some work on ArcCam targets happened within the last day.  I think Deltakosh will have words about this... in < 4 hours from now.  Thanks for the report and PG.

Link to comment
Share on other sites

That is correct, aW.   A-weird-o issue, eh?   hmm.  *scratch scratch*

Mr. @Deltakosh, would you assist with this, please?

On 9/21/2016 at 4:27 AM, MacSkelly said:

Click on left sphere to set it as camera target.  Now try control-dragging.  Target moves with camera.  Problem?  I think so.

Related to:  https://github.com/BabylonJS/Babylon.js/commit/725298b717773e271b1256bca45a96db8159cdf2#diff-c5e36d2c529e0623cfb58b616c79943fL15173 ??

Adam's work-around is nice, but perhaps not a proper long-term fix.  Thanks for help. 

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