I´m new here and i have an noob problem.
Why this code does´t work:
Code: Select all
function load()
end
function update(dt)
end
function draw()
love.graphics.draw("hello world",100,100)
end
Code: Select all
function load()
end
function update(dt)
end
function draw()
love.graphics.draw("hello world",100,100)
end
Code: Select all
local font = love.graphics.newFont(love.default_font, 12)
love.graphics.setFont(font)
Code: Select all
local font = love.graphics.newFont("Arial.ttf", 12)
love.graphics.setFont(font)
Code: Select all
------------------------------------------------------
function load()
--Player settings
player_walk_timer=0
player_skin='A'
player_size=12
player_walking=false
player_font = love.graphics.newFont(love.default_font, player_size)
--Physical settings
world = love.physics.newWorld(1000, 1000)
world:setGravity(0, 100)
ground = love.physics.newBody(world, 0, 0, 0)
ground_shape = love.physics.newRectangleShape(ground, 500, 490, 1000, 10)
player=love.physics.newBody(world,100,100,10)
player_csharp=love.physics.newCircleShape(player,player_size/2)
end
------------------------------------------------------
function update(dt)
world:update(dt)
if player_walk_timer>1 then
player_walk_timer=0
if (player_skin=='A') then
plyer_skin='I'
else
player_skin='A'
end
end
player_walk_timer=player_walk_timer+dt
end
------------------------------------------------------
function draw()
love.graphics.setFont(player_font)
love.graphics.draw(player_skin,player:getX(),player:getY())
love.graphics.draw("player_walk_timer="..player_walk_timer,100,100)
Code: Select all
plyer_skin='I'
Code: Select all
player_skin='I'
According to Box2D docs, the offset is the point (in world coordinates) where the force is applied, usually resulting in a torque about the center of mass of said body.gagagott wrote:I hope this is my last problem.xD
http://love2d.org/docs/Body_applyForce_2.html
what means offset?
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 4 guests