Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sprite in Image

edited July 2014 in Questions Posts: 22

When I try this, The sprite gets all messed up.



  • where is defined screen, x and y ?

  • use readImage instead :

    myImage = readImage("Planet Cute:Heart")

  • IgnatzIgnatz Mod
    edited July 2014 Posts: 5,396

    @Leviathan - setContext is meant to be used when you draw to an image in memory, not to the screen, eg

      --draw something
    --then in the draw function....
    sprite(img,400,200) --draw the image held in memory
  • Posts: 2,820

    I don't think that "Documents:person" is a square. What you want to do is something like this:

    img = readImage("Documents:person")
    sprite(img, x, y, img.width*2, img.height*2)

    We're all interpreting your question different ways. Can you give us a bit more detail with how your sprite gets mixed up? My code above will allow you to scale a sprite.

  • The user and all related content has been deleted.
  • Posts: 22

    I got it to work both ways, thank guys! Sorry about not sending enough information. I ended up using a viewMatrix and a restMatrix. And readImage works better, because it's not as laggy. Thanks guys!

Sign In or Register to comment.