[Solved]Stairs

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Dr.Tyler O.
Citizen
Posts: 58
Joined: Tue Jul 29, 2014 9:17 am
Location: United States

[Solved]Stairs

Post by Dr.Tyler O. »

Basically if a body (the player) collides with another body (the stair) that is of a certain height then allow the player to move over the stair.

Edit: To my knowledge, Love won't allow a body to travel over another body regardless of how short the second body is. I could be wrong but from what I've experienced, that seems to be the case.
Last edited by Dr.Tyler O. on Mon Sep 08, 2014 9:18 am, edited 2 times in total.
Any topic I have ever posted that I felt did not require a .love file, although they were requested, never required one so I would appreciate if you did not ask me to supply one unless you think that I am ignorant for not doing so.
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: Stairs

Post by rmcode »

Not sure what you are asking here ... ?
User avatar
Dr.Tyler O.
Citizen
Posts: 58
Joined: Tue Jul 29, 2014 9:17 am
Location: United States

Re: Stairs

Post by Dr.Tyler O. »

rmcode wrote:Not sure what you are asking here ... ?
With all due respect, how is that difficult to understand? I want to know how to allow a body to travel over another body if the "stair" is at or below a certain height. Think of a flight of stairs in real life for instance, you couldn't step over a stair that was three feet tall. The problem being that Love won't allow a body to travel over another body regardless of how short it is.
Any topic I have ever posted that I felt did not require a .love file, although they were requested, never required one so I would appreciate if you did not ask me to supply one unless you think that I am ignorant for not doing so.
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: Stairs

Post by rmcode »

Dr.Tyler O. wrote:
rmcode wrote:Not sure what you are asking here ... ?
With all due respect, how is that difficult to understand?
With all due respect, using question marks and asking an actual question would've helped ;)

Are you using box2d for collisions?
User avatar
Dr.Tyler O.
Citizen
Posts: 58
Joined: Tue Jul 29, 2014 9:17 am
Location: United States

Re: Stairs

Post by Dr.Tyler O. »

No, I'm just using Love's physics system.
Any topic I have ever posted that I felt did not require a .love file, although they were requested, never required one so I would appreciate if you did not ask me to supply one unless you think that I am ignorant for not doing so.
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: Stairs

Post by rmcode »

Dr.Tyler O. wrote:No, I'm just using Love's physics system.
Then what you probably need is sensors:

http://www.iforce2d.net/b2dtut/sensors

and

https://love2d.org/wiki/Fixture:setSensor

IIRC there is also an example for this in the examples.love:
http://www.love2d.org/wiki/examples.love
User avatar
Dr.Tyler O.
Citizen
Posts: 58
Joined: Tue Jul 29, 2014 9:17 am
Location: United States

Re: Stairs

Post by Dr.Tyler O. »

Thanks for pointing me in the right direction. Also the 0.9.0 example browser doesn't contain an example of this.
Any topic I have ever posted that I felt did not require a .love file, although they were requested, never required one so I would appreciate if you did not ask me to supply one unless you think that I am ignorant for not doing so.
User avatar
Plu
Inner party member
Posts: 722
Joined: Fri Mar 15, 2013 9:36 pm

Re: Stairs

Post by Plu »

For completeness' sake, love.physics uses box2d, so they're basically the same.

Also, it really helps if you upload a .love file of what you've made so far, because from the description in the opening post you could've been using a lot of different things and we have no real way of figuring out what kind of help you need.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests