Page 1 of 1
Wall sliding
Posted: Sat Aug 15, 2020 4:18 pm
by OneOrigiN
Hello everyone! I'm new to love2D, and I interested in wall sliding.
So, what I want:
- wall sliding(please pay attention at pic. 1 and 3)
- asklove1.png (546.1 KiB) Viewed 5492 times
Yeah,googled didn't help me. I just found some examples in unity.
P.S sorry for my english.
Re: Wall sliding
Posted: Sat Aug 15, 2020 6:02 pm
by MrFariator
Perhaps looking up tutorials or examples on the subject using Box2D (the physics engine that's packaged with löve under love.physics) might yield relevant results. Of course, you might not find examples that are exactly applicable to löve, but any such code should be relatively straight forward to convert to equivalent lua.
Re: Wall sliding
Posted: Fri Aug 21, 2020 10:34 am
by OneOrigiN
I solved the problem with the sliding (only on pic. 3). When player hits the "wall" i'm just using :setLinearVelocity() to make sliding effect.But I have another problem: Player can't jump while he's sliding.I tried to stop player first, and then apply impulse but it didn't work.