Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
sauer2
Citizen
Posts: 61
Joined: Tue Sep 02, 2008 4:15 pm

using love.graphics.draw(img,x,y,r,1,1,0,0)
Is it wanted that changing the radiant value changes also the origin of the image?
Or did i miss something new?
Attachments
It is just changing the r value

pekka
Party member
Posts: 206
Joined: Thu Jan 07, 2010 6:48 am
Location: Oulu, Finland
Contact:

Re: Radiant and the origin position.

I assume the rotation is not what you wanted, and changing the last arguments to 32 and 32 (half of 64) makes the image rotate the way you wanted. If you want your images to rotate around their centers, the origin offsets (that is the last two argumetns) should be half the image size.

In other words, change the drawing call to this:

Code: Select all

love.graphics.draw(IZ1,64,64,y,1,1,32,32)


sauer2
Citizen
Posts: 61
Joined: Tue Sep 02, 2008 4:15 pm

Re: Radiant and the origin position.

Ah, Image rad origin = image origin. Got it, thanks!

Who is online

Users browsing this forum: No registered users and 7 guests