Third Person Shooter Character Collisions

Blitz3D Forums/Blitz3D Programming/Third Person Shooter Character Collisions

Gabriel(Posted 2004) [#1]
Essentially I'm talking about a first person shooter where the camera is behind slightly and the player character is visible. But collision-wise, exactly the same as a FPS should be fine. It seemed relatively simple, but I don't much care for the result.

I've got Ellipsoid collisions for the player model, and polygon for the world. I've got it set so that the player doesn't slide back down slopes. It works up to a point, but it's very jerky around the bottom of slopes. The player just seems to reverberate if you move toward the side of a wedge shape at the bottom.

I loaded up Si's FPS example with the Gargoyle to see if it was just my code, but that demo does exactly the same thing. So is there a better way to do this with Blitz collisions? Or do I need to write my own again?


Shambler(Posted 2004) [#2]
I could tell you how I did it in SARE engine but then I would have to kill you or lock you up in a cupboard for a long time ;)

The method you are trying I found totally inadequate especially when there are steps to negotiate in a level.

I you are using MoveEntity I would check how much downward force you are using for gravity, too much and I find the sphere/ellipse just doesn't like going up slopes or any transition in geometry.


jfk EO-11110(Posted 2004) [#3]
What I do is: I make a line pick against the ground every step anyway - short range picks are pretty fast. I use that pick to control jumps btw.

So if pickednx etc. signals that the slope under the players feet is steep and my char would actually slide down, due to gravity-y-decremention, i simply prevent sliding down the slope by repositioning the player at the last position AFTER updateworld. Of course, this should be done only when the player is not walking or running.

Not shure if this will solve your problem.


Gabriel(Posted 2004) [#4]
Please Granny, don't lock me in the cupboard again. Sorry, mental flashback.

There are no steps at the moment, and I probably won't have any, but I'll take another look at the gravity to see if I can fix that. It's fairly floaty at the moment, but maybe a little less would help.

JFK : I don't think that it will stop the juddering I'm getting, but it's definitely good information. I've been toying with the idea of doing my own collisions. I think I would need five short linepicks to get full player / level collisions working, so if short linepicks are quite fast, that might be doable.

Failing that, I might have to give Nuclear Glory's collision DLL a test. It's apparently very smooth and very fast, so it could be just what I need.

Thanks guys.


Shambler(Posted 2004) [#5]
What about tokamak? O.o

[Edit] With a linepick going straight down you can also modify the gravity force depending on the result of the pick.

If the pick is successful ( players feet are on the ground ) then use a very low gravity force.

If the pick fails then exponetially increase gravity ( up to a maximum ) until the player hits the ground again.


Gabriel(Posted 2004) [#6]
Tokamak is really more than i need. I don't really enjoy realistic physics myself and I don't want to make games that go down that route. I'm all about making games fun instead. I appreciate I'm in the minority, but everyone's gotta have a gimmick. Nuclear Glory's system on the other hand, seems to be similar to Blitz collisions, just better and faster.

Yeah, I like the idea of a linepick and adjusting gravity accordingly. That's good, thanks.


Shambler(Posted 2004) [#7]
I can understand what you mean, there's something about realistic physics that sometimes feels just downright weird.

Maybe it is that it appears TOO realistic.

In a way I prefer that if I throw a box it doesn't spin around in the air but instead keeps it's static orientation and lands flat on the floor.

And if that box then hangs over an edge I would prefer it to just stay there and not tip over and starting rolling.

Maybe it is because there is too little friction in the simulations I've seen so far, I'll have to have a more in depth play with the parameters.


Neochrome(Posted 2004) [#8]
Where do i get this .DLL?


Gabriel(Posted 2004) [#9]
http://www.nuclearglory.com