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.
[Solved]Stairs
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Dr.Tyler O.
- Citizen
- Posts: 58
- Joined: Tue Jul 29, 2014 9:17 am
- Location: United States
[Solved]Stairs
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.
- Dr.Tyler O.
- Citizen
- Posts: 58
- Joined: Tue Jul 29, 2014 9:17 am
- Location: United States
Re: Stairs
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.rmcode wrote:Not sure what you are asking here ... ?
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.
Re: Stairs
With all due respect, using question marks and asking an actual question would've helpedDr.Tyler O. wrote:With all due respect, how is that difficult to understand?rmcode wrote:Not sure what you are asking here ... ?
Are you using box2d for collisions?
- Dr.Tyler O.
- Citizen
- Posts: 58
- Joined: Tue Jul 29, 2014 9:17 am
- Location: United States
Re: Stairs
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.
Re: Stairs
Then what you probably need is sensors:Dr.Tyler O. wrote:No, I'm just using Love's physics system.
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
- Dr.Tyler O.
- Citizen
- Posts: 58
- Joined: Tue Jul 29, 2014 9:17 am
- Location: United States
Re: Stairs
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.
Re: Stairs
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.
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.
Who is online
Users browsing this forum: Google [Bot], Semrush [Bot] and 2 guests