Search found 3 matches

by NickL
Wed Jul 21, 2010 8:35 pm
Forum: Support and Development
Topic: Spawning with a click
Replies: 6
Views: 3360

Re: Spawning with a click

So, how exactly would I mash all of that together with the physics tutorial on the wiki, so wherever I click a ball spawns? Here is the code: function love.load() world = love.physics.newWorld(650, 650) --create a world for the bodies to exist in with width and height of 2,000 world:setGravity(0, 70...
by NickL
Wed Jul 21, 2010 7:02 pm
Forum: Support and Development
Topic: Spawning with a click
Replies: 6
Views: 3360

Re: Spawning with a click

How would I combine these two to create a ball where I click the mouse? bodies[1] = love.physics.newBody(world, 650/2, 650/2, 15, 0) --place the body in the center of the world, with a mass of 15 shapes[1] = love.physics.newCircleShape(bodies[1], 0, 0, 20) --the ball has a shape of 20 love.mousepres...
by NickL
Wed Jul 21, 2010 4:44 pm
Forum: Support and Development
Topic: Spawning with a click
Replies: 6
Views: 3360

Spawning with a click

I was just wondering how I would spawn a physics object, such as a square, wherever on the screen I click.