Representing 3d Staircases? (Python)

I have tried googling this and so far have found nothing that precisely answered my question.
Below is some sample code for my current map tile class.

class tile:
    def __init__(self, minX, minY, minZ, maxX, maxY, maxZ):
        self.minimumX = minX
        self.minimumY = minY
        self.minimumZ = minZ
        self.maximumX = maxX
        self.maximumY = maxY
        self.maximumZ = maxZ

    def coordsinSelf(self, x, y, z):
        return x >= self.minimumX and x <= self.maximumX
            and y >= self.minimumY and y <= self.maximumY 
            and z >= self.minimumZ and z <= self.maximumZ

In short, I want to have a real staircase which the user can walk up and down on. The movement would increase the user's Y and Z, or Z and Y depending on how you perceive coordinates. I do not want the user to hold page up and essentially move strait up in the air... I actually want slopes.
My issue? The current tile system I use cannot support this. If the player stands beside the staircase and jumps to get on it, they will land inside the block. Ignoring the slope until they land.
Let me demonstrate this with an example:
Let's say that our staircase is from 0 to 30 on all dimensions. Let's also say that it has enough slope to make each step move the player by 1 unit both vertically and horizontally.
Now, the player is at (31, 0, 0). They jump and tap the left arrow key. In my system, depending on the speed at which they hammer the button, they will land inside the block rather than on the first step. For example, if their Z is 4 by the time they tap the arrow, they will land on my staircase at (30, 0, 4), which is incorrect (there is no step at 30 0 4). What should happen is the player landing on the first step of the staircase, which is (30, 0, 0).
I could get around this by having an individual tile mimic the elevation of the staircase, but that seems too wasteful in terms of resources.
Obviously I'm missing something here. The question is what?
I know that a similar question has been asked on here a bit earlier, but I wasn't really satisfied with the answers it received. Someone mentioned trying out Panda3d for 3d Objects, but the documentation I found on the library was less than helpful. To put it in perspective, the sound example took some heavy modifications on my side and even then it worked half the time.
I don't mind reading... I just need to know what exactly am I looking for here.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ogomez92 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ogomez92 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ogomez92 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector

Reply via email to