Package com.jme3.bullet.collision.shapes

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


    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

        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

    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

  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

            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

        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

    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

    entities.add(entity);
    mapNode.attachChild(entity);
  }
 
  public CollisionResults getCollisions(Ray ray) {
    CollisionResults results = new CollisionResults();
    mapNode.collideWith(ray, results);
    return results;
  }
View Full Code Here

  public void initialize(AppStateManager stateManager, Application app) {
    super.initialize(stateManager, app);
    tuioInput = TuioInput.get();
    tuioInput.addListener(this);
    BitmapFont guiFont = app.getAssetManager().loadFont("Interface/Fonts/Default.fnt");
   
    BitmapText tuioStatsLabel = new BitmapText(guiFont, false);
        tuioStatsLabel.setLocalTranslation(0, tuioStatsLabel.getLineHeight()*3, 0);
        tuioStatsLabel.setText("Tuio Input:");
        tuioStatsNode.attachChild(tuioStatsLabel);
View Full Code Here

TOP

Related Classes of com.jme3.bullet.collision.shapes.CapsuleCollisionShape

Copyright © 2018 www.massapicom. 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.