texturesursinastretching

Ursina engine does not scale images to size


I am creating a game in ursina. No info required. I have a png file labelled stone.png located inside a folder called assets in my project folder. I would have a line of code like this: exmaple=Entity(model=cube,scale=(1,2),texture='stone.png')

The texture gets stretched over the entity. No errors, nothing. I am running ursina version 5.3.0 .

I have tried texture_scale='mesh' and that just repeats the texture. This solves part of my problem, being I needed to have the texture repeated, but the textures don't get resized to fit and the textures have a big gap. Please help. If there is any bugs/issues do to with this ursina version, please let me know. Thanks for your help. enter image description here


Solution

  • Please try like this.

    example=Entity(model=cube,texture_scale=(1,2),texture='stone.png')