Page 1 of 1
Ladders
Posted: Tue May 10, 2011 6:53 pm
by lareusoular
Norbo, how could I make ladders with bEPU? Because with Rotated Boxes the player will fall, and with one box foreach degree the player won't get up...
ps.: I'm using bEPU 0.14.3. I know it's old, but DBP is too next for me to risk my Engine to the new version =)
Re: Ladders
Posted: Tue May 10, 2011 7:28 pm
by Norbo
It depends on what your game needs. A very simple solution is to make the ladder a fixed rail that you can go up and down. That way you can have simple entry/exit criteria like 'player pressed 'use' on a ladder' to jump on, and then 'player pressed use again while on the ladder or reached the end of the ladder' to jump off. The traditional movement scheme would be abandoned while attached to the rail. Instead, you could use a curve or something which defines the position at some t parameter.
If you wanted something more Half-Lifeish where the character can still turn around and shoot and basically move freely while climbing the ladder, then you'd have to do a bit more work. You could detect entry into a ladder volume or use raycasts to search for forward obstacles and ladders. Once you are on the ladder, you reinterpret the movement so that you move on the ladder instead of with your 'feet.' If the character jumps or goes too far off the ladder you can detach them and let them fall.
Re: Ladders
Posted: Tue May 10, 2011 7:55 pm
by lareusoular
Norbo wrote:It depends on what your game needs. A very simple solution is to make the ladder a fixed rail that you can go up and down. That way you can have simple entry/exit criteria like 'player pressed 'use' on a ladder' to jump on, and then 'player pressed use again while on the ladder or reached the end of the ladder' to jump off. The traditional movement scheme would be abandoned while attached to the rail. Instead, you could use a curve or something which defines the position at some t parameter.
If you wanted something more Half-Lifeish where the character can still turn around and shoot and basically move freely while climbing the ladder, then you'd have to do a bit more work. You could detect entry into a ladder volume or use raycasts to search for forward obstacles and ladders. Once you are on the ladder, you reinterpret the movement so that you move on the ladder instead of with your 'feet.' If the character jumps or goes too far off the ladder you can detach them and let them fall.
Thanks for the solution, I was going to question that too(tought about it now) =) I was questioning about Stairs(the english trolled me

) ...
Could you say what is the solution for the basic stairs? ... And thanks for the Ladder solution, I will put this on too =)
Re: Ladders
Posted: Tue May 10, 2011 7:59 pm
by Norbo
The SimpleCharacterController should already handle stairs just fine. You can make them physically like normal stairs, and assuming the character controller was configured with sufficient step height, it will walk right up as expected. For the simple character controller, there is no real difference between 'standing' and 'stepping' since it's just a raycast coming out of the bottom that tries to maintain a fixed height above whatever is below the character.
Re: Ladders
Posted: Wed May 11, 2011 12:32 am
by lareusoular
Norbo wrote:The SimpleCharacterController should already handle stairs just fine. You can make them physically like normal stairs, and assuming the character controller was configured with sufficient step height, it will walk right up as expected. For the simple character controller, there is no real difference between 'standing' and 'stepping' since it's just a raycast coming out of the bottom that tries to maintain a fixed height above whatever is below the character.
Ok, thanks! I will take a good look at it =)
And just another question: Actually, for my level's collision Map, I'm using a box by box make(make a box everywhere it should collide, and make that invisible... Is that good?
Re: Ladders
Posted: Wed May 11, 2011 1:14 am
by Norbo
As far as the character is concerned, that's fine.
If you have a huge number of blocks or extremely large blocks, you may start seeing issues. Lots of objects can cause a slowdown, and excessively large objects could cause numerical problems. Box-box has a very robust special case that avoids numerical problems for the most part, but if you dropped a Cone or other shape that has no special case on a huge box, it might not look great. If you don't see any issues, it's fine
