Hello everyone I am new to the forum,
I wonder how I can assign to a physical character that is an image sprite.
When I create a character that is how I do:
sprite = love.graphics.newImage "sprite.png"
and then I atribo movement to it from the image:
quads = {
down = {
Quad (0, 0, 32, 48, 128, 192);
Quad (32, 0, 32, 48, 128, 192);
Quad (64, 0, 32, 48, 128, 192);
Quad (96, 0, 32, 48, 128, 192);
};
{left =
Quad (0, 48, 32, 48, 128, 192);
Quad (32, 48, 32, 48, 128, 192);
Quad (64, 48, 32, 48, 128, 192);
Quad (96, 48, 32, 48, 128, 192);
};
{right =
Quad (0, 96, 32, 48, 128, 192);
Quad (32, 96, 32, 48, 128, 192);
Quad (64, 96, 32, 48, 128, 192);
Quad (96, 96, 32, 48, 128, 192);
};
up = {
Quad (0, 144, 32, 48, 128, 192);
Quad (32, 144, 32, 48, 128, 192);
Quad (64, 144, 32, 48, 128, 192);
Quad (96, 144, 32, 48, 128, 192);
};
}
I wonder how I can assign no physical this image sprite
Physics + sprite image
- Ranguna259
- Party member
- Posts: 911
- Joined: Tue Jun 18, 2013 10:58 pm
- Location: I'm right next to you
Re: Physics + sprite image
[wiki]love.physics[/wiki] and lot's of other lib which I can't remember right now, just search on the forum..
Who is online
Users browsing this forum: No registered users and 0 guests