Hello,
I have a little problem with physics.
This code does not work:
[java]bulletAppState = new BulletAppState();
stateManager.attach(bulletAppState);
CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(1.5f, 6f, 1);
player = new CharacterControl(capsuleShape, 0.05f);
player.setJumpSpeed(20);
player.setFallSpeed(30);
player.setGravity(30);
player.setPhysicsLocation(new Vector3f(0, 10, 0));
CollisionShape sceneShape =
CollisionShapeFactory.createSingleMeshShape(cube);
landscape = new RigidBodyControl(sceneShape, 0);
cube.addControl(landscape);
bulletAppState.getPhysicsSpace().add(landscape);
bulletAppState.getPhysicsSpace().add(player);
[/java]
I don’t know why.
Thanks for anwsers,
chris_black
It does not work how?
you have an exception?
Please describe what’s going wrong or we won’t be able to help
Definitely need more information but you don’t seem to have a player entity that the character control is added to?
Matt
1 Like
Thanks for anwserws,
It work now.