Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / [Dark Physics] Character Controller not sitting on floor

Author
Message
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 8th Aug 2006 12:52 Edited at: 8th Aug 2006 12:53
Hi,

I have setup a capsule character controller, but in the simulation it seems to always be sitting above the ground, has anyone else had this and figured out what it is.

Screenie from debugger:



Thanks for any help in advance

I know the voices aren't real, but they have good ideas!
Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 8th Aug 2006 13:41 Edited at: 8th Aug 2006 13:41
You'll probably find the root bone or model center position for your character is in it's feet. So, when the capsule is made for a character controller, it appears to make it from the model center outwards based on the sizes you give it.

Try doing this, and see if it solves the problem:


That will offset the route limb on the Y-axis upwards by half the players height, hopefully pointing the center point of the model in the center of the player and the capsule should then adjust properly.

monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 8th Aug 2006 14:12 Edited at: 8th Aug 2006 14:12
I just tried using the offset and the capsule seems to remain above the ground, I thought maybe it could be the auto-stepping size you know so it makes the object sit off the ground that amount so it can step over objects of that height but no.

Anyway here is my code for setting up the character.


I know the voices aren't real, but they have good ideas!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Aug 2006 14:21
where does your capsule sit if you set the 256.0 in the last line above to zero.

is it half way into the floor or under it.

I'm not getting you down am I, Ho Look! another fancy Door?
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 8th Aug 2006 14:23
It sits virtualy under the floor with only its dome showing above the ground.

I know the voices aren't real, but they have good ideas!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Aug 2006 14:31
Ok, now I see why you have put 256.0 for your height, so the amout that you could see sticking out the top of the floor is how much you will have to reduce the height by.

I'm not getting you down am I, Ho Look! another fancy Door?
Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 8th Aug 2006 14:31
Hmmm. Can't believe I missed the x#,y#,z# parameters. They probably act as offsets from the route object position and allow you to specify where the center is, avoiding the need to offset the route bone. I'll have to have a play with that later.

Just to clarify, is it the actual capsule that is off the ground in the debugger, or just the character the capsule is for in DBP?

monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 8th Aug 2006 14:40
@ Fallout

Yeah its the actual character capsule in the debugger that is off the ground, the height of the char' capsule is 128.0 so to position the camera I use
object position y( char ) + 64.0
Obviously (well I thought) to position the camera at the top of the char' capsule, the y pos plus half the height, but that makes the camera well above where it should be in the world as I have a switch on the wall which should be at eye level which I use for reference.


@ HowDo

Yeah, the amount that the capsule pokes above the ground is I assume exactly 32.0 which is what the capsule also sits above the ground, I could get round it by reducing the capsule height but this may cause problems when raycasting enemy bullets if there is nothing to hit at the players feet.

I know the voices aren't real, but they have good ideas!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Aug 2006 14:48
Sound Like if you could make this into a little demo we could all try it might be how you are doing it or it could be something for Mike to look at.

I'm not getting you down am I, Ho Look! another fancy Door?
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 8th Aug 2006 14:57 Edited at: 8th Aug 2006 14:59
Just to inject more fun into this problem,
I have reduced the height of my capsule so that the height of it plus the height is sits of the ground is equal to what I intended it to be 128.0 units to the very top.

I have gone to try and walk through a doorway which is 96.0 wide, 160.0 high and the capsule in total is 64.0 wide and 128.0 high I found that I can't walk through again I have checked out the debugger and the capsule as you will see in the pic below looks as though it should be able to fit through with plenty of room to spare, but it doesn't let me

Screenie from the debugger:



EDIT: Yeah I'm gonna knock up a demo now, maybe its a bug I dunno?

I know the voices aren't real, but they have good ideas!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Aug 2006 15:08
So how wide or high does it have to be to let you through?

I'm not getting you down am I, Ho Look! another fancy Door?
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 8th Aug 2006 15:11
Quote: "So how wide or high does it have to be to let you through?"


I'm not sure as the map was made in 3dws so I'd have to go back edit it, then export it, then pack it, then encrypt it to add the map to my game engine (pain in the ass).

But really the debugger shows that the capsule should fit through and what you see in the debugger is what the physics system sees so I don't understand?

I know the voices aren't real, but they have good ideas!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Aug 2006 15:15
look like we do it in reverse then, make the object smaller until it fits.

find what works then you can see what might be the problem.

I'm not getting you down am I, Ho Look! another fancy Door?
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 8th Aug 2006 15:49
I have attached a demo project, which shows off this problem, if you run the debugger first you will see what I mean about the capsule looking as though it should fit, and the debugger fetches all of its info from the physics system directly?

I know the voices aren't real, but they have good ideas!

Attachments

Login to view attachments
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Aug 2006 16:09
I just change this line to half its size and it goes through.

phy make capsule character controller 1, 0.0, 256.0, 0.0, 16.0, 128.0, 1, 16.0, 40.0

will now try making bigger till it stops.

I'm not getting you down am I, Ho Look! another fancy Door?
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 8th Aug 2006 16:10
Thanks for providing a demo monotonic. Makes it much easier to find what's going on this way

I have had a closer look at this and it appears the examples in the AGEIA PhysX SDK do the same thing. Might be something going on behind the scenes that we need to account for.

Reducing the height from 128 to 115 seems to work well with your demo.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Aug 2006 16:17
and also changing 32.0 down to 28.2 lets you go through

I'm not getting you down am I, Ho Look! another fancy Door?
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 8th Aug 2006 16:20 Edited at: 8th Aug 2006 16:21
Thanks for all your help guys, I appreciate it

I will change the scaling on my character to what you suggested and crack on with it.

I know the voices aren't real, but they have good ideas!
Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 9th Aug 2006 13:08
I'm having similar problems with my character controllers now. I realised I'd made them incredibly short (about 1/4 the height of my characters), which was causing a few problems with collisions from above. So I adjusted them to the correct height and now I can't get under doorways. So I reduced my character controllers to about 2/3s to 1/2 the height of my characters and still the same problem. The capsules shown in the debugger are around half the height of a door frame, but still can't fit underneath.

Very bizarre stuff. So I basically have to forgo collision with the upperbody of my characters in order for them to walk around the level. Gonna see if I can suss out the problem.

monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 9th Aug 2006 13:16
Fallout

How wide are your doors, because it seems its not just the height that is affected by this problem its also the width.

I know the voices aren't real, but they have good ideas!
Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 9th Aug 2006 13:25 Edited at: 9th Aug 2006 13:36
Extremely wide in places. Here's a screenie.



At this point, all characters are stuck. The 3 big capsules are enemies trying to get towards the smaller capsule. Whats more bizarre is that the capsules are defined as being the same size, but are clearly different sizes.


Edit: Adjusting the width did actually help, and now they're moving through again. Obviously there needs to be a large amount of clearance, which is a bit of a problem, especially when ray casting has to penetrate quite deeply into a CC capsule before it detects collision with it anyway. Very bizarre stuff.

Attachments

Login to view attachments
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 9th Aug 2006 13:51
It is very strange, in my map the doorway is 96.0 wide and I had to reduce to radius of my character to 28.0 to allow it to get through, but I have some stacked crates and there is a gap between them that is about 40.0 wide and the player can walk freely between them.

Also the capsules showing up different sizes in the debugger when they are exactly the same size is weird too, Mike said that the demo's that came with the ageia sdk have the same problem so I think this may be a bug in the sdk???

I know the voices aren't real, but they have good ideas!
Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 9th Aug 2006 14:01 Edited at: 9th Aug 2006 14:01
They seem to collide properly with each other though. All my enemies kinda pile into each other and are properly distanced, plus they can normally move into the scenery without any problems and be the correct distance away, but when restricted both height and width ways it seems to cause a problem. I dunno. Bizarre. And look, my capsules are floating too! My game is viewed from above, so I didnt really notice until now.

HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 9th Aug 2006 14:37
So guys don't forget to make those variables

width#=XX
height#=XX

phy make capsule character controller g_arrCharacters(0).CharID, 0.0, 256.0, 0.0, width#, height#, 1, 16.0, 40.0

Will save you changing them all again when it is sorted only two to change.


I'm not getting you down am I, Ho Look! another fancy Door?

Login to post a reply

Server time is: 2024-04-19 22:56:44
Your offset time is: 2024-04-19 22:56:44