Character Controller calcPosition

jettero heller

16-03-2009 00:37:00

Hi everybody.

I'm looking at the nxogre 0.9 character controller.
I'm a bit confused about the calcPosition method
calcPosition(NxVec3 &out, NxVec3 &moveVector, NxQuat &direction, NxVec3 &g, float t,....) {
out = (moveVector + g) * t;
}

I don't understand what is moveVector. Is it an acceleration? is it a direction?
How is calculated the output direction? How is related with the uniformly accelerated rectilinear motion law s = v0t+1/2at^2??
Sorry if this is a stupid question.

almondega

17-03-2009 17:03:54

usualy, the move vector in cc is a direction/force vector, and is the only one param needed at the front-end to move the character
it will be used to move your character using force (how much meters foward, in example) and direction (to where)

but in this case, you have a param only for the force (the move) and for direction (quaternion direction)

i cant tell you about the others params
but remember, you have to set up an final vector (maybe multiplying the move x direction and some other laws) to send to the NxCharacter (physx dll)
att

betajaen

17-03-2009 17:12:32

MoveVector is the target direction (or translation) of where the character should end up in this current tick.