Custom character control


I want to be able to apply force to my character, currently i see two options: extend CharacterControl so it can have applyForce method, or extend RigidBodyControl. It would be easy if i could somehow prevent rigid body from rotating.


You can set the angular damping to 1 to prevent it from rotating.

A rigidbody can also be moved with forces, btw…


this may be helpful

1 Like

@husky thx, that’s exactly what i wanted :slight_smile:
@wezrule that is interesting, but i think i’ll go with extending rigidbody, i think charactercontrol has some limitations

actually angular damping only slow rotation :frowning:

Should work when you set it to 1.

I already set angular damping to 1 and it is not working :confused:

How are you moving your object? Did you try higher values for setAngularDamping (not sure if this works, wild guess). For me, it works to set it to 1f. When also setting the setLinearDamping, the object does not move at all anymore.

I use CapsuleCollisionShape and move it on the ground(so it has friction), but it falls eventualy.
EDIT: and I tryed to setAngularDamping higher than 1, but the result is same.

Are you moving by applying forces?

[java]setSleepingThresholds(0.0f, 0.0f);

@husky yes
@wezrule thx, that worked :slight_smile:

EDIT: setSleepingThresholds(0f, 0f) was not required