Player floats in bounding box...
by SM3 · in Torque Game Engine · 09/18/2006 (6:26 am) · 8 replies
This has been asked before by others on the forums, but I didn't find a response, seems most of the posts go really unanswered regarding this issue... The player character not touching terrain, but floats above it.
I've uploaded two [pictures removed now that I have an anwer] of what I'm asking about. I'm using the stock BraveTree Jill character. If you look closely at Jill in the starter.fps picture you'll see she is floating above the terrain. If you look closer, she's floating inside her bounding box as well.
The second photo is her inside Torque Showtool Pro. It shows her flat with the grid (which I would assume is the terrain in Torque) and if you turn on the bounding box it's also completely flat.
Sometimes the edge of the bounding box catches on sloping terrain so that elevates her some while going up/down uneven terrain, and I realize this is because we are using a "box" for collision, but the terrain I have in the photo is flat and she's still floating.
Does anyone have a fix for this? I know it's a small detail, but I'm the type of person where the little details matter.
Thanks for the read.
Steve
I've uploaded two [pictures removed now that I have an anwer] of what I'm asking about. I'm using the stock BraveTree Jill character. If you look closely at Jill in the starter.fps picture you'll see she is floating above the terrain. If you look closer, she's floating inside her bounding box as well.
The second photo is her inside Torque Showtool Pro. It shows her flat with the grid (which I would assume is the terrain in Torque) and if you turn on the bounding box it's also completely flat.
Sometimes the edge of the bounding box catches on sloping terrain so that elevates her some while going up/down uneven terrain, and I realize this is because we are using a "box" for collision, but the terrain I have in the photo is flat and she's still floating.
Does anyone have a fix for this? I know it's a small detail, but I'm the type of person where the little details matter.
Thanks for the read.
Steve
About the author
#2
Well, I guess like you say I'll have to either 1) Forget it or move on 2) If I can't forget it, use something else! I know you use C4 also. I haven't noticed this in C4, yet. Maybe I'm just not looking close enough.
I've mentioned before I usually just play games (World of Warcraft) to examine the art and how things are put together, it's a hard habit to break, paying close attention to details.
Steve
09/18/2006 (7:16 am)
Hi Tim,Well, I guess like you say I'll have to either 1) Forget it or move on 2) If I can't forget it, use something else! I know you use C4 also. I haven't noticed this in C4, yet. Maybe I'm just not looking close enough.
I've mentioned before I usually just play games (World of Warcraft) to examine the art and how things are put together, it's a hard habit to break, paying close attention to details.
Steve
#3
09/18/2006 (7:20 am)
Quote:Tell me about it. Ever since I ventured into creating my own games, playing them hasn't been the same. Too many illusions destroyed. It's not as much fun when you know how everything is done.
I usually just play games (World of Warcraft) to examine the art and how things are put together, it's a hard habit to break, paying close attention to details.
#4
So true! I was flying around the city of Stormwind in World of Warcraft with the WoW Map Viewer when I discovered parts of the city are actually just billboards, that look "ok" from afar! Making games is like Magic, just smoke-and-mirrors. Incidently, this is one of the reasons why they don't let players use flying mounts in the original areas of World of Warcraft but will in the expansion
I frequently use different engines for my educational purposes and with one in particular, Panda3d, you can specify what type of collision solid you want to use. I guess I've been spoiled.
Steve
09/18/2006 (7:29 am)
Quote:Tell me about it. Ever since I ventured into creating my own games, playing them hasn't been the same. Too many illusions destroyed. It's not as much fun when you know how everything is done.
So true! I was flying around the city of Stormwind in World of Warcraft with the WoW Map Viewer when I discovered parts of the city are actually just billboards, that look "ok" from afar! Making games is like Magic, just smoke-and-mirrors. Incidently, this is one of the reasons why they don't let players use flying mounts in the original areas of World of Warcraft but will in the expansion
I frequently use different engines for my educational purposes and with one in particular, Panda3d, you can specify what type of collision solid you want to use. I guess I've been spoiled.
Steve
#5
They used to, back in the days, but modern games actually do one of two things to fix this:
1) Use IK to place the feet on the ground
2) Detect the slope of the ground and blend different animations based on slope
09/18/2006 (7:53 am)
Quote:In fact, load up any one of your favourite commercial fps games and you'll
notice they all suffer from the same problem.
They used to, back in the days, but modern games actually do one of two things to fix this:
1) Use IK to place the feet on the ground
2) Detect the slope of the ground and blend different animations based on slope
#6
And this is how I do it with Panda3d. Cast a ray and adjust Z accordingly to conform to the terrain. This is the reason why I asked the question here, figured there must be some way to fix this.
Steve
09/18/2006 (8:12 am)
Quote:2) Detect the slope of the ground and blend different animations based on slope
And this is how I do it with Panda3d. Cast a ray and adjust Z accordingly to conform to the terrain. This is the reason why I asked the question here, figured there must be some way to fix this.
Steve
#7
The cast ray? Well, it's possible. First you change the sCollisionMoveMask in the Player class and remove the terrain from the mask, thus allowing you to handle terrain collisions independently.
Then you go to Player::updatePos() and add your own checks against the terrain (using raycasting instead of box collision) after the usual collision tests.
09/18/2006 (2:09 pm)
Quote:
And this is how I do it with Panda3d. Cast a ray and adjust Z accordingly to conform to the terrain. This is the reason why I asked the question here, figured there must be some way to fix this.
Incidently, does this happen in TSE?
The cast ray? Well, it's possible. First you change the sCollisionMoveMask in the Player class and remove the terrain from the mask, thus allowing you to handle terrain collisions independently.
Then you go to Player::updatePos() and add your own checks against the terrain (using raycasting instead of box collision) after the usual collision tests.
#8
I'll either ignore it or move on if I just can't ignore it ;)
Steve
09/18/2006 (2:47 pm)
Thanks Manoel, but this is a little out of my league. My Panda3d example is done in Python so it's easier for me to work with. I'll either ignore it or move on if I just can't ignore it ;)
Steve
Torque Owner Tim Heldna
why you haven't had much luck receiving a response.
What you see in Show Tool is irrelevant as Jill is not standing on terrain or
any form of collideable surface.
Torque uses a bounding box to calculate collision. This will always result in
characters being slightly elevated off the terrain, especially on sloping
surfaces.
A flat box cannot conform to a curved surface.
Some engines use a bounding sphere, which does yield better results however the
problem will still be present.
In fact, load up any one of your favourite commercial fps games and you'll
notice they all suffer from the same problem.
It's probably standing out for you as you're analyzing you're game far greater
than any one playing it will. You're looking at it through developer's eyes, not
gamer's eyes. The fact is, in the heat of battle most people won't even notice.
Long story short; there's nothing you can do about it. Process and move on to
more important things =)
-Tim.