About Store Forum Documentation Contact



Post Reply 
[SOLVED] Character Controller and Step Height
Author Message
para Offline
Member

Post: #16
RE: Character Controller and Step Height
I think character controller is 'forced' to step over any meshes whose actor groups are added to ctrl_ground_group_force. (ignoring steepness)

Phsysics.ctrl_ground_slope controls the max angle (steepness) under which slopes are still climbable by the controller. (different then step height)

In the first setup you had, I think your initial step is limited by controller step height, and from then on it's limited by slope angle. What's the height of your controller anyway, 1.8 units?
(This post was last modified: 03-27-2014 08:28 AM by para.)
03-27-2014 08:26 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #17
RE: Character Controller and Step Height
Thanks for the response Para.

(03-27-2014 08:26 AM)para Wrote:  I think character controller is 'forced' to step over any meshes whose actor groups are added to ctrl_ground_group_force. (ignoring steepness)
Yeah, I'd assumed that's what it was I just wasn't sure why we needed to do this as I'd assumed step height was enough and the steepness of anything under the step height would be ignored as the intention is to ''step over' it. Where steps are individual models doing this should be straight forward, however lots of steps internal to my buildings are an integral part of the model and I'd have to do quite a lot of work to separate those as I don't want my characters stepping over houses wink

(03-27-2014 08:26 AM)para Wrote:  Phsysics.ctrl_ground_slope controls the max angle (steepness) under which slopes are still climbable by the controller. (different then step height)
Yeah, so setting this to zero presumably removes any restriction on slope angle. This might not be such an issue for NPCs as in my setup the movement is controlled by the nav mesh which has built in restrictions on slope angle anyway. So long as characters don't attempt to climb vertical walls or other characters as they did in the last engine I used grin That doesn't appear to be the case here! However, for the player controller that's a different matter as that's not restrained by the nav mesh.

(03-27-2014 08:26 AM)para Wrote:  In the first setup you had, I think your initial step is limited by controller step height, and from then on it's limited by slope angle. What's the height of your controller anyway, 1.8 units?
Yes, its a standard 1.8 unit character and the resultant capsule height is the same. I can get around this by increasing the radius of the controller but then I encounter other issues related to the width.

I'll play around with all of this some more and explore the possibilities.
03-27-2014 09:26 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #18
RE: Character Controller and Step Height
Hi,

Quote:Greg, I'm not sure I understand your reference above to setting a custom actor group for the stairs, and include that group index in the "Physics.ctrl_ground_group_force" (to ignore collision normal vectors). Do slopes come into play even when they are on objects below the currently set step height? If you, or anyone else, could just explain this in a bit more detail I'd appreciate it as I want to ensure I get this right.

You can define a new actor group AG_XXX.
Then please set the Stairs actor to this group stairs_actor.group(AG_XXX);
Then you need to include that group for Physics manager: Physics.ctrl_ground_group_force|=IndexToFlag(AG_XXX);
This way normal vector of the capsule controller collision with the stairs actor will be ignored, and it will always be walkable.

Please let me know if this helps
03-31-2014 06:09 AM
Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #19
RE: Character Controller and Step Height
Thanks for the feedback Greg. I've got diverted recently onto other aspects but I'll try this out this weekend and let you know. Cheers!
04-04-2014 10:59 PM
Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #20
RE: Character Controller and Step Height
Worked like a charm! Many thanks again smile
04-06-2014 12:05 AM
Find all posts by this user Quote this message in a reply
Post Reply