Radiant and the origin position.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
sauer2
Citizen
Posts: 61
Joined: Tue Sep 02, 2008 4:15 pm

Radiant and the origin position.

Post by sauer2 »

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
rad.love
It is just changing the r value
(39.93 KiB) Downloaded 147 times
pekka
Party member
Posts: 206
Joined: Thu Jan 07, 2010 6:48 am
Location: Oulu, Finland
Contact:

Re: Radiant and the origin position.

Post by pekka »

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)
User avatar
sauer2
Citizen
Posts: 61
Joined: Tue Sep 02, 2008 4:15 pm

Re: Radiant and the origin position.

Post by sauer2 »

Ah, Image rad origin = image origin. Got it, thanks! :)
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Majestic-12 [Bot] and 5 guests