Package org.openmali.vecmath2

Examples of org.openmali.vecmath2.Vector3f.sub()


     */
    private void actionSearchToCopulate(long frameTime) {
        if (focusedPartner != null) {
           
            Vector3f path = new Vector3f();
            path.sub(focusedPartner.getPos(), pos);
            angle = Angle.angle(path.getX(), path.getY());
           
            // not even necessary to check if near enough here
            // we will be kindly notified of every collision by
            // our own World. see the notifyCollision(Digibot) method
View Full Code Here


     */
    private void actionSearchForFood(long frameTime) {
        if (focusedFood != null) {
           
            Vector3f path = new Vector3f();
            path.sub(focusedFood.getPos(), pos);
            angle = Angle.angle(path.getX(), path.getY());
           
            // check if we are near enough to eat
            if (path.length() < radius * 1.5f) {
                action = Action.EAT;
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.