Examples of CharacterControl


Examples of com.jme3.bullet.control.CharacterControl

        return new CapsuleCollisionShape(1.5f, 3f, 1);
    }

    @Override
    public void addPhysicsControl() {
        player = new CharacterControl(getCollisionShape(), 0.1f);
        player.setJumpSpeed(20);
        player.setFallSpeed(30);
        player.setGravity(30);
        player.setPhysicsLocation(new Vector3f(0, 10, 0));
        player.setCollisionGroup(PhysicsCollisionObject.COLLISION_GROUP_03);
View Full Code Here

Examples of com.jme3.bullet.control.CharacterControl

    // a capsule collision shape and a CharacterControl.
    // The CharacterControl offers extra settings for
    // size, stepheight, jumping, falling, and gravity.
    // We also put the player in its starting position.
    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));
View Full Code Here

Examples of com.jme3.bullet.control.CharacterControl

    // Create a appropriate physical shape for it
    // spheres both calculate collision MUCH faster, and also much more intelligently.
    // The capsule clipping problem is going to be intrinsic to any object model which isn't using forces to adjust it's position smoothly.

    SphereCollisionShape sphereShape = new SphereCollisionShape(PLAYER_RADIUS);
    CharacterControl player = new CharacterControl(sphereShape, 2f);
    // Attach physical properties to model and PhysicsSpace
    playerNode.addControl(player);
    physicsSpace.add(player);

    return player;
View Full Code Here

Examples of com.jme3.bullet.control.CharacterControl

        mat_player.setTexture("ColorMap", assetManager.loadTexture("Textures/WOOOOW.jpg"));
        playerBody.setMaterial(mat_player);
        playerBody.setName("body");
        player.attachChild(playerBody);
        CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(1.5f, 6f, 1);
        playerc = new CharacterControl(capsuleShape, 0.05f);
        playerc.setJumpSpeed(20);
        playerc.setFallSpeed(30);
        playerc.setGravity(30);
        playerc.setPhysicsLocation(position);
        rootNode.attachChild(player);
View Full Code Here

Examples of com.jme3.bullet.control.CharacterControl

    this.world = world;
    assetManager = world.getAssetManager();
    inputManager = input;
    hector = hull;

    player = new CharacterControl(hector.getCollisionShape(), .1f);
    player.setJumpSpeed(PLAYER_JUMP_SPEED);
    player.setFallSpeed(PLAYER_FALL_SPEED);
    player.setGravity(PLAYER_GRAVITY);
    player.setCollisionGroup(PhysicsCollisionObject.COLLISION_GROUP_01);
    player.setUserObject(this);
View Full Code Here

Examples of com.jme3.bullet.control.CharacterControl

    }


    public Player setupCharacterPhysics() {
        capsuleShape = new CapsuleCollisionShape(3f, 4f);
        character_phys = new CharacterControl(capsuleShape,  0.05f);
        character_phys.setApplyPhysicsLocal(true);
        this.addControl(character_phys);
       // avatar.addControl(character_phys);
       
        return this;
View Full Code Here

Examples of com.jme3.bullet.control.CharacterControl

        return name;
    }

    public Player setupCharacterPhysics() {
        capsuleShape = new CapsuleCollisionShape(3f, 4f);
        character_phys = new CharacterControl(capsuleShape, 0.05f);
        character_phys.setApplyPhysicsLocal(true);
        this.addControl(character_phys);
        // avatar.addControl(character_phys);

        return this;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.