I wasn't mean this, for background i mean everything that is behind the number (it isn't just one color)Zeliarden wrote:Like thisCode: Select all
r, g, b, a = love.graphics.getBackgroundColor( ) love.graphics.setColor( 255-r, 255-g, 255-b)
Search found 7 matches
- Fri Dec 04, 2015 11:05 am
- Forum: Support and Development
- Topic: Negative color
- Replies: 4
- Views: 5512
Re: Negative color
- Fri Dec 04, 2015 10:17 am
- Forum: Support and Development
- Topic: Negative color
- Replies: 4
- Views: 5512
Negative color
How can i color a text (created with love.graphics.print) with the negative of the backgruond?
- Sat Nov 21, 2015 1:38 pm
- Forum: Support and Development
- Topic: Obtaining body by point.
- Replies: 5
- Views: 2946
Re: Obtaining body by point.
First you do a query and this will give you a list of fixtures. https://love2d.org/wiki/World:queryBoundingBox Then you iterate the list and use "testPoint" on each fixture. https://love2d.org/wiki/Fixture:testPoint Last you get the associated body for each fixture. https://love2d.org/wik...
- Thu Nov 19, 2015 6:31 pm
- Forum: Support and Development
- Topic: Obtaining body by point.
- Replies: 5
- Views: 2946
Obtaining body by point.
How can i obtain a body by a point? if there is a body of 100x100 in 250,300 how can i obtain it with the point 280,310 (for example)?
- Sun Nov 08, 2015 7:36 am
- Forum: Support and Development
- Topic: I can't apply gravity on my character.
- Replies: 6
- Views: 4347
Re: I can't apply gravity on my character.
Alexar wrote:Fab1can wrote:I've write this code:Code: Select all
player.body = love.physics.newBody (world, player.x, player.y, dynamic) [/quote] it's "dynamic" not a nil value[/quote] What do you mean?
- Sun Nov 08, 2015 7:24 am
- Forum: Support and Development
- Topic: I can't apply gravity on my character.
- Replies: 6
- Views: 4347
Re: I can't apply gravity on my character.
I've added world:update (dt) in the update code but it continues to have no gravity. Now the code is: function love.load() player = { x = 200, y = 210, speed = 150, img = nil } player.img=love.graphics.newImage ("char.png") love.physics.setMeter (32) world = love.physics.newWorld(0 , 32*9....
- Sat Nov 07, 2015 6:08 pm
- Forum: Support and Development
- Topic: I can't apply gravity on my character.
- Replies: 6
- Views: 4347
I can't apply gravity on my character.
I've write this code: function love.load(arg) player = { x = 200, y = 210, speed = 150, img = nil } player.img=love.graphics.newImage ("char.png") love.physics.setMeter (32) world = love.physics.newWorld(0 , 32*9.81) player.body = love.physics.newBody (world, player.x, player.y, dynamic) p...