Community Forum

Create character controller

Forum Overview >> Scripting

Created05.10.2011 07:45

Natal Venetz (Unknown) 05.10.2011 08:10

I tried to get this Character Controller working but i didn't get to an end.

What I do is:

I create a cube as a player dummy

playerDummyId = "default static object"

Link it with the rootNode.

createCCT(playerDummyId , float radius, float height, float stepOffset, float slopeLimit, float skinWidth, float collisionMask, float mass)

I understand the first three parameters. The fourth should be ok as well. But i dont get the rest. Can somebody explane me the five last parameters and how they would look like for a cube with 1 radius and 1 height.

moveCCT(playerDummyId, float x, float y, float z, float collisionMasks)

The idea of the last parameter here is to change the collision mask while moving, right?

Because of the Mass parameter of the creat function i suppose that phisics are avaiable for the Character. But if i test the character ingame i didn't make it that another dynamic object is moving.

Can somebody help me out with this questions?


Stefan Geiger - GIANTS Software 07.11.2011 11:08
Here is description of the parameters:
stepOffset: Maximum distance the character can climb with one step (e.g. the height of a step of a staircase)
slopeLimit: Maximum angle of the ground the character can walk
skinWidth: Skin width used for the simulation of the character (see other references of PhysX)
collisionMask: Collision mask used for the kinematic capsule placed at the character position
mass: Mass of the character. Determines how much force is applied to colliding dynamic objects

moveCCT moves the player. The collision mask here is different from the collision mask used for creation. It determines where the player can walk through. The collision mask used for collision is used to determine which objects can move through the character.

Note: Log in to post. Create a new account here.