Changeset 62

Show
Ignore:
Timestamp:
05/13/08 21:22:22 (7 months ago)
Author:
JoeCoder
Message:

Fixed spring spasm when crossing 0 degrees.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/proj/buildme.d

    r61 r62  
    3636// Paths are relative to the build script. 
    3737char[]   mod_path = "../src";                       // The root folder of all modules 
    38 char[][] src_path = ["../src/yage", "../src/demo1"];// Array of folders to look for source files 
     38char[][] src_path = ["../src/yage", "../src/demo2"];// Array of folders to look for source files 
    3939char[][] imp_path = ["../src/derelict"];            // Array of folders to look for imports 
    4040char[][] lib_path = ["../lib"];                     // Array of folders to scan for libraries 
  • trunk/src/demo1/main.d

    r56 r62  
    7070        ship.input = !ship.input; 
    7171    } 
    72      
     72 
    7373    void onMousemove(Surface self, byte buttons, Vec2i rel){ 
    7474        if(ship.input){ 
  • trunk/src/demo1/ship.d

    r56 r62  
    104104            mouseDelta.x = mouseDelta.y = 0; 
    105105        } 
    106  
     106         
     107        writefln(getRotation()); 
    107108 
    108109        // Bank on turn 
  • trunk/src/yage/util/spring.d

    r57 r62  
    5555    /// Update the position of the floater relative to what it's attached to. 
    5656    void update(float delta){ 
    57         Vec3f h = head.getAbsoluteRotation(); 
    58         Vec3f t = tail.getAbsoluteRotation(); 
    59         tail.setRotation(Vec3f((t.x+h.x)/2, (t.y+h.y)/2, (t.z+h.z)/2)); 
     57        tail.setRotation(head.getAbsoluteRotation()); 
    6058 
    6159        Vec3f dist = head.getAbsolutePosition() - tail.getAbsolutePosition() + distance.rotate(head.getAbsoluteTransform());