Search found 7 matches

by Fab1can
Fri Dec 04, 2015 11:05 am
Forum: Support and Development
Topic: Negative color
Replies: 4
Views: 5512

Re: Negative color

Zeliarden wrote:Like this

Code: Select all

r, g, b, a = love.graphics.getBackgroundColor( )
love.graphics.setColor( 255-r, 255-g, 255-b)
I wasn't mean this, for background i mean everything that is behind the number (it isn't just one color)
by Fab1can
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?
by Fab1can
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...
by Fab1can
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)?
by Fab1can
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?
by Fab1can
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....
by Fab1can
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...