FPS collision physics

Blitz3D Forums/Blitz3D Programming/FPS collision physics

Rob(Posted 2003) [#1]
The stair problem still exists in Blitz. I have thought about using two collision spheres: one for the feet and another much like a hula hoop. If the hoop collides, the player will not be raised... this gives us a basic step height limit.

What methods do you suggest/use that you'd like to share?


Ross C(Posted 2003) [#2]
I'd set a different collision for stairs. Use a flat angled quad (on top of the stairs, so he doesn't actually collide with them)and when the player is io the stairs, put him in stair climbing mode, where the camera bobs about like he is climbing stairs.


Spacemonkey(Posted 2003) [#3]
stair climbing mode ?


jfk EO-11110(Posted 2003) [#4]
Or use a ramp with EntityAlpha 0.0 over the stairway. Yes, for climbing up walls etc. some specialized things are required, such as a climbing mode. I have an other problem, that's my player tends to slide down the stairway and down ramps, caused by gravity. How would you solve that? If I say "apply gravity only when his feet don't touch the ground" and the ground is made of the same mesh like the walls and ceil then this would allow the player to climb every wall.

Ok, maybe a tiny pivot between the feet that is much less WIDE then the radius that is used for collisions. So it would be possible to check if the feet touch the ground and nothing else. But how would this act together with stairways? Not shure about that.


Rob(Posted 2003) [#5]
Usually the player will just stop if you use blitz collisions.

But by using a straight down linepick, you can use blitz collisions to make a fat belly that stops you climbing, and the pick to raise, lower yourself. Much like a hydraulic penis.


jfk EO-11110(Posted 2003) [#6]
I always try to avoid to use a lot of linepicks, but I think for gravity, jumping, stairs and climbing it's still the best solution...Fat belly? Reminds me of I really should make some sport today :/


Rob(Posted 2003) [#7]
haha yeah... I feel a spare tyre developing myself...


Zethrax(Posted 2003) [#8]
The code below is basicly what I use to control the traction point of my game characters, combined with a lot of flags and other crap.

; Note: 'touchdown_cutoff' is relative to the centerpoint of the entity. For a 2 metre high entity, touchdown_cutoff could be set to 90 centimetres to give 10 centimetres of traction height.

If ( EntityY# - CollisionY# ) > touchdown_cutoff Then

; Collision occured below the touchdown cutoff point. Allow traction.

Else

; Collision occured above the touchdown cutoff point. Don't allow traction.

EndIf