royibernthal Posted March 16, 2018 Share Posted March 16, 2018 I need to be able to map only a portion of a texture to a plane. My end goal is for the texture to be a spritesheet which I can animate by playing with its u and v offsets. The uvs need to be set dynamically at runtime since different spritesheet textures will be applied to the same mesh, therefore I'm using get/set verticesData and not passing uvs to the constructor via the options argument. This works for a box, following this doc: https://doc.babylonjs.com/how_to/createbox_per_face_textures_and_colors Which uvs do I need to play with when dealing with a plane? Here's a PG I created that contains both a Box and a Plane. The Box has the desired result, while the Plane needs to be adjusted. https://www.babylonjs-playground.com/#ICZEXW#63 On a sidenote, I'm note using GUI AdvancedDynamicTexture for this for performance reasons. I need 20 300x300 animations like this at 60 fps on the screen at all times. Hopefully what I'm trying to do here would be more sane in terms of performance. If not then please feel free to burst my bubble. Quote Link to comment Share on other sites More sharing options...
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.