Stairs move and down

Hi guys!

In the moment I’m working at my project NoWay a 3D game. But I have a problem. I have build stairs but I can’t move the stairs up or down. I tried everything, but nothing works.

Could someone help me? I really nead help…
Bye
Rex Dungeur

You should post a screenshot of your scene so we can know a little bit more about your setup.

Probably the easiest way to avoid issue in stairs is to create a collision mesh like this:
image

3 Likes

nice way but it’s very strange when I go the stairs down…

…because I will slide the stairs down.

Hi girls!
I found a stairs playground by @splash27 … works pretty good. (arrows or wasd keys)

It uses handy FPS (first person shooter) collision system… built-into BJS and freeCam.

If you need third-person view instead, you would make test boxPlayer (any mesh)… and set its checkCollisions true. Then move the boxPlayer up/down the stairs… via boxPlayer.moveWithCollisions() operations.

anymesh.moveWithCollisions() is VERY different… and sometimes challenging. :wink:

Hint. For third person view (perhaps with follow-cam)… maybe make boxPlayer.ellipsoid be small on X/Z, but tall on Y. If boxPlayer.ellipsoid is too fat… player could “slide down stairs”… depending on z-depth/tread-depth of each stair-step.

Generally speaking, turn off ALL collision-stuff upon (any) camera… for 3rd person view. boxPlayer gets all the collision stuff… but not .applyGravity. When using boxPlayer.moveWithCollisions() to move mesh on stairs… you must code your own gravity effects. (not very difficult)

Too much to explain at this point, Rex. :slight_smile: I just wanted to show you a non-moveWithCollisions() playground (first-person) made by a forum friend. Be well. Look for others to comment, and maybe a friendly forum helper will make a third person PG version for us… and show us. :wink:

4 Likes

Thank you very much! :grin:

2 Likes

Oh sorry @Wingnut, but I want that the cameraspeed is by 2.
But thanks for helping me!