Hello there,
I have already implemented BEPU for physics (ragdoll, etc.), but I'm at the stage in my game development where I have to think about Player Control. I see that there is a "Character Controller" for BEPU, that I read about here : http://www.bepuphysics.com/blog/2011/8/ ... tails.html
I also have to think about AI controlled enemies. Both the Main Player and enemies are skinned models that include animations of course, which control the collisions. I really don't want anything too crazy actually :
- Enemies and player walk on ground and affected by gravity, and ability to jump.
- Collision objects I have so far on my main character are spheres and boxes, would be similar for enemies.
- Most static collidable objects right now are boxes and spheres, not really thinking too much about per triangle collisions.
Would the Character Controller be suitable for this type of scenario?
Is there any documentation on how to use it, or is it mostly contained in sample code?
I'm trying to think of scenarios where I'm wondering if thing will work properly. For example, if animations control the placement of physics objects on a character, how does this coordinate with the physics engine?
Thank you so much I really appreciate it, and great work on this awesome Physics Engine hehe. =D
- Michael
Character Controller Question =)
Re: Character Controller Question =)
The CharacterController sounds like it would work fine. It's very robust in all the usual FPS scenarios.Would the Character Controller be suitable for this type of scenario?
The CharacterControllerInput class shows how to tell the CharacterController to move around. There's not a whole lot to it; pressing "C" in any of the BEPUphysicsDemos will spawn the character to play with if you want to fiddle with some modifications.Is there any documentation on how to use it, or is it mostly contained in sample code?
The CharacterController itself has its own collision (a cylinder) that interacts with the environment. While the character is walking around under its own power, the ragdoll entities should probably be disabled. Another option would be to modify the collision rules such that the ragdoll bones still collide with parts of the environment that wouldn't obstruct the player (like small dynamic crates), while the CharacterController's body would collide with the main environment and most larger stuff to keep it from walking through walls and such.I'm trying to think of scenarios where I'm wondering if thing will work properly. For example, if animations control the placement of physics objects on a character, how does this coordinate with the physics engine?
When the character 'dies,' the character controller can be disabled and the ragdoll entities take over.
Thanks and you're welcomeThank you so much I really appreciate it, and great work on this awesome Physics Engine hehe. =D

Re: Character Controller Question =)
I should also note that if you don't need discontinuous 'stepping' behaviors or crouching, the SphereCharacterController is a ever-so-slightly faster version of the CharacterController. It can still go over obstacles by sliding over the top of them, but it is dependent on its radius and maximum support slope.
-
- Posts: 7
- Joined: Sat Jan 07, 2012 8:25 am
Re: Character Controller Question =)
Wow, thank you for the quick and helpful reply. =)
My game is going to be a 3rd person game, mixed with fixed camera angles (Resident Evil or Silent Hill style). I would indeed need stepping behavior actually, and probably crouching too hehe.
I will definitely be taking a look at the Character Controller stuff very soon. I hate to burden you with another question...but I thought it would help me get a head start, especially since the DEMO keeps crashing on startup for me, probably something to do with this machine or something is not installed, not sure =( Anyhow, here it goes..Is the cylinder dyanmic, in that it changes size depending on conditions? For example, if the character is running with an animation, and he is making very large strides with his legs, would the cylinder radius shrink and expand so to speak? In the long run this might not even be that important, but I was just thinking of clipping issues, with walls and such. Thanks so much again.
- Michael
My game is going to be a 3rd person game, mixed with fixed camera angles (Resident Evil or Silent Hill style). I would indeed need stepping behavior actually, and probably crouching too hehe.
I will definitely be taking a look at the Character Controller stuff very soon. I hate to burden you with another question...but I thought it would help me get a head start, especially since the DEMO keeps crashing on startup for me, probably something to do with this machine or something is not installed, not sure =( Anyhow, here it goes..Is the cylinder dyanmic, in that it changes size depending on conditions? For example, if the character is running with an animation, and he is making very large strides with his legs, would the cylinder radius shrink and expand so to speak? In the long run this might not even be that important, but I was just thinking of clipping issues, with walls and such. Thanks so much again.
- Michael
Re: Character Controller Question =)
The cylinder's shape is mostly fixed. It changes when crouching. Other than that, the cylinder is just supposed to be a rough container of the character body. Long strides usually only occur when running, which is typically not going on when the character's face is almost up against a wall, so that particular kind of clipping probably won't be a significant issue.Anyhow, here it goes..Is the cylinder dyanmic, in that it changes size depending on conditions? For example, if the character is running with an animation, and he is making very large strides with his legs, would the cylinder radius shrink and expand so to speak? In the long run this might not even be that important, but I was just thinking of clipping issues, with walls and such.

-
- Posts: 7
- Joined: Sat Jan 07, 2012 8:25 am
Re: Character Controller Question =)
Gotcha, that makes perfect sense. =) I'll try and get that demo working also. Thanks again!