Examples of CapsuleCollisionShape


Examples of com.jme3.bullet.collision.shapes.CapsuleCollisionShape

        spatial.setUserData("entity", this);
    }

    @Override
    public CollisionShape getCollisionShape() {
        return new CapsuleCollisionShape(1.5f, 3f, 1);
    }
View Full Code Here

Examples of com.jme3.bullet.collision.shapes.CapsuleCollisionShape

     *
     * @return
     */
    protected CollisionShape getShape() {
        //TODO: cleanup size mess..
        CapsuleCollisionShape capsuleCollisionShape = new CapsuleCollisionShape(getFinalRadius(), (getFinalHeight() - (2 * getFinalRadius())));
        CompoundCollisionShape compoundCollisionShape = new CompoundCollisionShape();
        Vector3f addLocation = new Vector3f(0, (getFinalHeight() / 2.0f), 0);
        compoundCollisionShape.addChildShape(capsuleCollisionShape, addLocation);
        return compoundCollisionShape;
    }
View Full Code Here

Examples of com.jme3.bullet.collision.shapes.CapsuleCollisionShape

    // We set up collision detection for the player by creating
    // 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.collision.shapes.CapsuleCollisionShape

    bulletAppState = new BulletAppState();
    stateManager.attach(bulletAppState);

    rootNode.attachChild(SkyBoxFactory.createSimpleSkyBox(assetManager));

    CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(1.5f, 6f, 1);

    vehicleControl = new RigidBodyControl(capsuleShape, 1f);
    vehicleControl.setKinematic(false);
    player = new Player(assetManager);
    player.setLocalTranslation(0.0f, -5.0f, -2.0f);
View Full Code Here

Examples of com.jme3.bullet.collision.shapes.CapsuleCollisionShape

        assetManager.loadTexture("spaceobject/asteroid/dusty/asteroidtextur_512.jpg"));
    asteroid.setMaterial(mat_asteroid);

    rootNode.attachChild(asteroid);

    CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(1.5f, 6f, 1);
    vehicleControl = new RigidBodyControl(capsuleShape, 1f);
    vehicleControl.setMass(1.0f);

    cam.setLocation(vehicleControl.getPhysicsLocation());
    cam.setRotation(vehicleControl.getPhysicsRotation());
View Full Code Here

Examples of com.jme3.bullet.collision.shapes.CapsuleCollisionShape

    sceneObject = GlobalObjectStore.<AssetManager>getObject(AssetManager.class).loadModel("ship/glider/Hull.mesh.xml");
    sceneObject.addLight(new PointLight());
    sceneObject.setName("PlayerShip");

    // TODO: ship: Gr��e laden
    CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(1f, 2f);
    rbc = new RigidBodyControl(capsuleShape, 1f);
    rbc.setSleepingThresholds(0.01f, 0.01f);

    rbc.setSpatial(getSceneObject());
    sceneObject.addControl(rbc);
View Full Code Here

Examples of com.jme3.bullet.collision.shapes.CapsuleCollisionShape

  protected CollisionShape collisionShape;

  public Hector(World world, ColorRGBA mainColor, ColorRGBA trimColor, ColorRGBA cockpitColor) {
    super(mainColor);

    collisionShape = new CapsuleCollisionShape(1.5f, 0.7f, 1);

    mainMatColor = mainColor;
    secondaryMatColor = trimColor;
    tertiaryMatColor = cockpitColor;
View Full Code Here

Examples of com.jme3.bullet.collision.shapes.CapsuleCollisionShape

            assetManager, "Common/MatDefs/Misc/ColoredTextured.j3md");  
        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);
View Full Code Here

Examples of com.jme3.bullet.collision.shapes.CapsuleCollisionShape

        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);
       
View Full Code Here

Examples of com.jme3.bullet.collision.shapes.CapsuleCollisionShape

    public String getName() {
        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);
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.