Jump to content

Walking up/down vertical stairs


kurhlaa
 Share

Recommended Posts

Hi,

I'm trying to implement a walking up/down vertical stairs, for example from the ground to the roof. Unfortunately I have no completely working ideas. Somehow player's mesh should:

1. With WS keys move Up/Down when he is next to the stairs;

2. When he is at the top of the stairs - he should go forward instead of Up, to the roof, without falling down after disconnecting from the stairs;

3. When his mesh is walking down and reaching the ground - he should "disconnect" from the stairs and start walking normally with the same S key pressed.

 

Could you give me some ideas how this should be implemented?

 

Thanks!

 

NOTE: vertical stairs :) not standard diagonal, but vertical. Like here -old-stair-vertical-industrial-metal-rust

Link to comment
Share on other sites

Hiya K-doggy!

https://www.babylonjs-playground.com/#Y1W3F9#6

Hold W, then later... S.  Wingy goofin' around.  :)  As you mentioned in PM, it is a fairly complicated operation, indeed.  Needs a supercomputer or something.  :/ 

I'm using more actionManagers than a Rube Goldberg sewing machine:o  :D   (Hey, it's Sunday here... my comedy writers have the day off and I'm wingin' it.)

This PG acts pretty good.  It has a momentary "float" when it leaves the top of the ladder... on a climb.

And... the cambox overlaps the ladder a bit... on the way down.  Perhaps you/others can improve it.

Kurhlaa has stated (in PM) that e wants stop-ability, reversibility, and camera look-around freedom (later, when cam is parented to box, IF Kurhlaa allows camera to be parented AT ALL)

The onEnter/onExit triggers probably won't work... without camera having a mesh either carried or ridden.  Could use different collision methods, I guess.

It might be nice if other forum helpers... created/tested some camera-only versions.  Custom camera.input ONLY when cam/ladder are in-collision?  hmm.  :o

I'll goof around with it some more if I get a chance.  Hopefully, we're in the neighborhood of success.  :)  We'll talk. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...