Examples of impel()


Examples of aspect.physics.RigidBody.impel()

        }
        ship.ang.roll = -ship.rigidBody().velocity.xy().dir() - angle;

        if (thrusters) {
            RigidBody rb = ship.rigidBody();
            rb.impel(Vector2.fromAngle(-ship.ang.roll, 60e3f).asXY());
        }

        if (Vector3.distance(ship.pos, earth.pos) < 90 || Vector3.distance(ship.pos, moon.pos) < 70) {
            //onAdd();
        }
View Full Code Here

Examples of aspect.physics.RigidBody.impel()

            } else if (isKeyDown(KEY_S)) {
                thrust = -4.0f;
            }
           
            RigidBody rb = ent.rigidBody();
            rb.impel(transform.forward().times(thrust * Time.deltaTime()));

            if (rb.velocity.mag() > 2.0f) {
                rb.velocity = rb.velocity.normalize().times(2.0f);
            }
        }
View Full Code Here

Examples of aspect.physics.RigidBody.impel()

        addBehavior(rigidBody);
        rigidBody.velocity = motion.velocity;
       
        World.main.add(new Explosion(transform.position));
       
        rigidBody.impel(new Vector3(2.0f, 0, 0), new Vector3(0, 1.0f, 0));
    }
}
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.