Problems with CharacterController

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
J2T
Posts: 48
Joined: Sat Sep 20, 2008 6:20 pm
Contact:

Problems with CharacterController

Post by J2T »

Hi Norbo,

i have some strange problems with the CharacterController after i updated to the new Version.
Now the character or better to say the bodyDetector gets stucked in the ground(StaticTriangleGroup).

before and after

btw the controller gives now also always isAirborne = true back!

I've tested a bit around(position, bodyHeight...) but can't find a solution. Maybe it is something else and not the controller?!

I hope you can give me a tip :D

thanks a lot and regards
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Problems with CharacterController

Post by Norbo »

This sounds pretty similar to another recent problem (end of http://www.bepu-games.com/forums/viewto ... ?f=4&t=371). Is the body too short in relation to its width and step height? The capsule can end up with very odd dimensions which appear to cause this problem.
J2T
Posts: 48
Joined: Sat Sep 20, 2008 6:20 pm
Contact:

Re: Problems with CharacterController

Post by J2T »

Thanks for reply,

no that wasn't the problem. I saw this post before and tested this also.

Height is 100f, skinWidth is 25.5f and maximumStepHeight is 60.1f and these settings worked very good for stairs, ramps and normal gameplay too :cry:
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Problems with CharacterController

Post by Norbo »

Does it ever work, or does it always fail to find any support? If it only occasionally gets stuck, does it consistently happen in the same areas?

I don't recall making any changes to the CharacterController, though I'm not sure yet what might have changed inside the engine to cause this. If you could provide a reproduction case (example mesh/code where it happens consistently) it would help me diagnose it.
J2T
Posts: 48
Joined: Sat Sep 20, 2008 6:20 pm
Contact:

Re: Problems with CharacterController

Post by J2T »

It always stucks...everywhere :cry:

When the game begins we normaly set the character at a fixed position on the ground. I did a debug version where i can set the character on different random positions. Everywhere the problems comes up. When i set the character randomized i always drop him a bit above the ground so that he falls a bit down to the ground. But as i can see it correct it doesn't mind how height he is above, the stuckdepth changes everytime.

I can image that this is hard to say why this is happen. And i dunno if it makes sense when i post code because it works befor. I did only one small change in the Controller but i tested this also and reverted this for testing.
I also tested different cell sizes which was the problem with the terrace...without success.

Btw as i mentioned before the Controller set IsAirborne continuous true now.

regards

edit: i downloaded the samples and saw that there are new controllers. i'll look closer now to this one first of all
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Problems with CharacterController

Post by Norbo »

I can't replicate the issue in the demos so I'm having trouble determining what could be causing it. If you use the default code (both the character controller itself and the character input settings for size and such) for the character controller from the demo, does it still do it? If it does, try scaling down a test version of the map proportionally (since the character is quite tiny compared to your world with the demos settings) and trying again. Does the scaled version also do it?


Edit:

If there's other character controllers besides the CharacterController and CharacterControllerInput, they are just remnants of some development that I left in on accident (again). They won't work very well, if at all.
J2T
Posts: 48
Joined: Sat Sep 20, 2008 6:20 pm
Contact:

Re: Problems with CharacterController

Post by J2T »

Thanks for fast replay!

Damn i wish i had downloaded the new Samples earlier. I think i can solve the problem when i merge with this CharacterController. There was a problem in the last update too where you changed sometime with i.e. localInertiaTensorInverse. I've updated the controller and it doesn't work. I tooked your Controller from the recent sample and it worked. I dunno until today which little changement i havn't found.

So please do not look closer i'll do some work these days with these controllers. btw. nice that you've implemented a version that checks out if there obstacles beetween the cam and the object. that something what i also have had to implement :)

Thanks norbo and good night!
J2T
Posts: 48
Joined: Sat Sep 20, 2008 6:20 pm
Contact:

Re: Problems with CharacterController

Post by J2T »

I'm glad to say that it works :)

I still updated my controller to your current version. Next time i'll remember and will do this first of all.

Thanks anyway :)
Post Reply