Search the Community
Showing results for tags 'billboard'.
-
Refer to the link below, for billboard enabled meshes, I added mouse pick event so the camera will target to the mesh which being clicked. However, after click on the mesh which BILLBOARDMODE_ALL is enabled, I got the following error. I'd be really appreciated if anyone can fix this issue. Thanks. https://www.babylonjs-playground.com/#9XBPW4#2 if (!m.actionManager){ m.actionManager = new BABYLON.ActionManager(scene); } var act = new BABYLON.ExecuteCodeAction( BABYLON.ActionManager.OnPickTrigger, pick ); m.actionManager.registerAction(act); function pick(evt){ var mesh = evt.meshUnderPointer; camera.setTarget(mesh); }
- 5 replies
-
- exceeded
- billboardmode_all
- (and 8 more)
-
I am trying to add a 4th LOD that is a billboard, but I don't see anywhere on how to actually use a billboard... how to make a billboard with a texture... Like a tree image. Can anyone tell me how to create billboard meshes with a texture... is that just a mesh with NO geometry BUT it does have a texture???
-
Is billboard mode working? If so, can anyone explain what it's doing conceptually, and how I can use it for a standard billboard effect (where the mesh is something like a hit point bar or a text label, that you want to be drawn un-rotated)? I'm using it in what seems like the obvious way. http://www.babylonjs-playground.com/#UJEIL#0 But as shown, meshes rotate based on the relative vertical angle between them and the camera. Is something broken, or is that not how you're meant to use it?
-
I'm trying, using my own shader, to make a billboard using a predefined XZ plane mesh. to do so, i first build the necessary vector (into my own material) to pass to the shader, var cam = scene.activeCamera; var look = cam.position.subtract(mesh.position).normalize(); var view = scene.getViewMatrix(); var up = new BABYLON.Vector3(view.m[1], view.m[5], view.m[9]); var right = BABYLON.Vector3.Cross(up, look); this._effect.setMatrix(__world_str, world); this._effect.setMatrix(__worldViewProjection_str, world.multiply(scene.getTransformMatrix())); this._effect.setVector3(__upVector_str, up); this._effect.setVector3(__rightVector_str, right); this._effect.setVector3(__center_str, mesh.position); then use the values into the shader as : vec3 newp = center + (upVector * position.x) + (rightVector * position.z); vec4 outPosition = worldViewProjection * vec4(newp, 1.); gl_Position = outPosition; where center is the center of the billboard. I use an ArcRotateCamera. However, this is NOT render properly. The plane is ALWAYS facing the camera, which is good, BUT it strectch vertically when spining arround.. What i have missed ???
-
if a mesh is assigned a parent and if its billboard mode is set then it is positioned incorrectly see http://www.babylonjs-playground.com/#AL9LF#0 here we have a sphere and a plane plane parent is set to sphere uncomment line 31. line 31 sets billboard mode notice that plane moves to different location
-
Hello, just want to know if this behavior is expected: when you set a Billboard mode to a mesh with a parent then the child mesh won't inherit scaling: http://www.babylonjs-playground.com/#1JSXHW Is there any way to avoid that? (other than changing the scaling to the child too)