Search found 993 matches

by Taehl
Mon Jan 11, 2010 11:42 am
Forum: Support and Development
Topic: Self-uprighting physics? (Solved)
Replies: 4
Views: 794

Self-uprighting physics? (Solved)

Currently, I use this bit of code to make the physics-based player character try to stand upright: local angle, avelocity, damp = player.b:getAngle(), player.b:getAngularVelocity(), 1.7 player.b:setAngularVelocity( avelocity + (-angle * damp) ) However, that can be buggy: If the player tumbles a ful...
by Taehl
Mon Jan 11, 2010 7:03 am
Forum: Support and Development
Topic: Body collision test (Solved)
Replies: 2
Views: 621

Re: Body collision test

EDIT) Aah, I hacked something out. Thank you! world:setCallbacks( nil, -- While things are colliding function(shape1, shape2, contact) if shape1 == "playerbottom" or shape2 == "playerbottom" then player.bottomtouch = true end if shape1 == "playertop" or shape2 == "playertop" then player.toptouch = t...
by Taehl
Mon Jan 11, 2010 5:11 am
Forum: Support and Development
Topic: Body collision test (Solved)
Replies: 2
Views: 621

Body collision test (Solved)

How can I tell when two Bodies are colliding? I've made a little physics-enabled platformer game, but I want to prevent players from jumping in midair.

Thanks in advance for any assistance. I'm new to LOVE, but I'm fairly skilled with Lua.