Having trouble with Collision

I’m trying to build a ramp for my character to climb on so that they can go to another level of a room, but even after i set the physics to character and create the floor with a collide box, it seems to just fall through the floor. I’ve tried with a few different properties on the character except it just don’t seem to want to stay on the floor. The last time i did try to get it working properly it did stay above the floor but it was like it was bouncing and hitting the floor every time it moved.

Now right now i have it set to dynamic, but even with the collide boxes it seems to just move into one single straight line with out being able to move up or down. Id like some help figuring out how to set this up so that it can move properly up a ramp or stairs.

Please supply a demo blend file that demonstrates clearly the problem you are seeing. Remove any unnecessary crap from your scene before saving to make it as simple as it needs to be

I made a tutorial a while ago on how to climb up stairs. It usually requires changing the movement type to servo or character instead of simple motion.

Ok thank you ill check it out!

How do you have the ramp set up in the physics context window? You might need to change the Bounds type to either convex hull or triangle mesh, whichever you haven’t tried. The ramp should also be set to static.

a way for stairs with dynamic objects:


#Stairs

#constances
maxheight = 0.7 #maximum height for the stairs
minheight = 0.1 #minimum height required for it to be recognised as a stair
playerheight = 2

if a:
    #walk left
    player.applyMovement((-0.15,0,0), False)
    hitbox.orientation = leftor
    
    if stairleft.positive: #stairs left
        leftpos = stairleft.hitPosition
        height = playerheight - (stairleftempty.position[2] - leftpos[2])
        if minheight < height < maxheight:
            player.applyMovement((-0.1,0,height), False)

elif d:
    #walk right
    player.applyMovement((0.15,0,0), False)
    hitbox.orientation = rightor
    
    if stairright.positive: #stairs right
        rightpos = stairright.hitPosition
        height = playerheight - (stairrightempty.position[2] - rightpos[2])
        if minheight < height < maxheight:
            player.applyMovement((0.1,0,height), False)


stairleft is a ray down an empty left from the player, stairright a ray down right from the player (in my case i also checked property to ground, and have a ground property in every ground object)

in my case it is just 2d but you could expand to 3d too

Attachments


Isn’t that just overkill for his problem? movement up a ramp is entirely and easily doable without the need for python scripting.

well he also asked for stairs, and Thatimster also sent a tutorial about stairs

Here’s an example of how you can set it up. The cube is a rigid body with Collision Bounds turned on. The ramp is a static object with Collision Bounds turned off (doesn’t make any difference). Press W to move the cube onto the ramp.

https://drive.google.com/open?id=0B7Tlcrz9ZntGTnlMbkpFRU8tTzA