Pi3d: Can I change the pivot point of an ImageSprite? - Raspberry Pi Forums
hi all,
have following simplified code create image sprite in pi3d library:
in application rotate image with: works fine. rotate image on specific pivot point / center point, need create image symmetrical in size around center point. save “unused” texture memory want adjust center point different location on texture sprite. there native way adjust center-point coordinates in pi3d? or need rotate , calculate new sprite.position achieve this?
have following simplified code create image sprite in pi3d library:
code: select all
file_texture = pi3d.texture("texture.png", blend=true) image_sprite = pi3d.imagesprite(texture=file_texture, shader=uv_flatshader, w=1024, h=1024) image_sprite.position(0, 0, 0)code: select all
image_sprite.rotatetoz(value)
i think need calculate on-the-fly, i'm prepared stand corrected if 2d object handled in same way 3d 1 0 points set in stone when object created.
however, it's not big job calculation in 2d 0 points follow arc determined size of image.
real picture , put in on table. rotate around it's center while follow bottom left corner. follow circle radius of it's center it's corner (pythagoras), not massive calculation.
dave.
however, it's not big job calculation in 2d 0 points follow arc determined size of image.
real picture , put in on table. rotate around it's center while follow bottom left corner. follow circle radius of it's center it's corner (pythagoras), not massive calculation.
dave.
raspberrypi
Comments
Post a Comment