'Ursina models scale
I'm building a game in ursina and for some Entity's I use my own texture images models-> I did try all models type offered by the framework (ex: quad,cube etc...)[for example my cat hero is taking damage from the red box even if its not actually hitting because the obj is much bigger than the image..its there a way to scale it?) But I'm not able to scale them properly so the actual entity obj is mush bigger than the image: Please see the image bellow: The code for those 3 entities is here:
wall = Entity(model='quad', scale=(2,3), x=-3,
collider='box', color=color.white,texture='images/cat_tower.png')
level = Entity(model='quad', color=color.white, scale=(3, 1), x=4, collider='box',texture='images/cat_slider_1')
trap = Entity(model='quad', scale=(2,2, 2), x=-5, y=1, collider='box', texture=f'images/trap.png',color=color.red)
Solution 1:[1]
For anyone having this problem seems that the problem was not in the code itself ( or ursina framework) but in the way I edited the PNG/JPG images objects-> even if I did not have the TRANSPARENCY set on each of them, seems that the issue was when I did crop them in Paint3D and set the transparency off I need to scale the image to fit totally in the object inside paint 3d white scheme( not to the scale I have it after I did magic select and crop it..)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |