Search the Community
Showing results for tags 'default'.
-
solved [SOLVED] Changing Camera Leads to Odd Camera Movement
xeroxM posted a topic in Questions & Answers
Hey Guys, first of all, I want to thank you for your great work in this forum, you really saved me a lot of time wanting to flip tables But now i found something, what is driving me nuts for already two weeks. So I am trying to develop a viewer for 3D objects which has, broken down on the most important things, two cameras which you can change. Those cameras happen to be the ArcRotateCam and the UniversalCam. What I want to happen is, that if the user clicks a button the camera changes (this already works fine), I also want both cameras to have a default position where they "start" (which they already have) and I want the camera to always be at the right position with the right angle (the default position/angle i set with initalizing them) when the user changes to the selected cam (this is where something odd is happening). So let's take this case: - User uses ArcRotate Cam, moves the camera and wants to change to Universal Cam. - User clicks the button and changes to Universal Cam -> Universal Cam is set to default position and default angle as its supposed to be. - User moves Universal Cam - User wants to change to ArcRotate Cam again and clicks button -> result: camera is not in default mode but there is some odd camera movement going on and camera is somewhere else. - If the user now moves the ArcRotate Cam again and changes to the Universal Cam, the camera moves away from the target, instead of being directly on it. I hope I described my problem properly and I really hope you got some answers. I broke the problem down in a Playground for you: http://playground.babylonjs.com/#P5PWBB There may be something missing cause I really broke the camera module down on the most important things. So if something is not clear, let me know! All the best! xeroxM -
Hi, I came across a problem where I couldn't have an animation behave as intended : https://playground.babylonjs.com/#7NPQG7 Click on the plane (aka ground) to move the ball to clicked location. On animation end, the color of the ball randomly changes. The movement from point A to point B has a sort of easingFunction to it, and the onAnimationEnd is called much later after ball arrived. But I expected the animation easing to be linear by default ???, and the onAnimationEnd function be called right on time at "arrival" ??? If someone can shed some light on this for me, would be very cool ^^
- 6 replies
-
- animation
- easingmode
-
(and 1 more)
Tagged with:
-
Right now, if you use a shaderPath = "MyShader" ... With no path info... it will look for the shader as "/src/Shaders/MyShader.vertex.fx". That should load from the folder the .babylon file is in Just like textures... Right??? I think it would be MUCH easier if it did, JUST LIKE TEXTURES Can we fix that... I don't know where in the code that is happening