Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11996


Ignore:
Timestamp:
May 24, 2018, 3:54:42 PM (6 years ago)
Author:
jacobsr
Message:

Changed parameters for velocity

Location:
code/branches/OrxyRoad_FS18/src/modules/orxyroad
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoad.cc

    r11985 r11996  
    9797        int trafficVelocities[]= {200,1400,500, 300};
    9898        int velocityVariation[] = {40,80,100,20};
    99         int numObjects[] = {60,40,30,40}; // default, spaceship, sattellite, asteroid per track
     99        int numObjects[] = {30,30,30,30}; // default, spaceship, satellite, asteroid per track
    100100        int streetSize[] = {3 , 1, 2, 4};
    101101        int trackWidth = 700;
     
    114114                        cubeList.push_back(cube);
    115115                        int templateType = rand()%2;
     116
    116117                        switch(type)
    117118                        {
     
    137138                            }else {
    138139                                cube->addTemplate("satellite");//satellite
    139                             }                     
     140                            }                   
    140141
    141142                           
     
    208209            {
    209210                int type  = rand() % 4;
    210                 orxout(user_info) << "Random : "<<type<< endl;
     211                //orxout(user_info) << "Random : "<<type<< endl;
    211212
    212213                roadWidth = generateStreet(type,player);//Generate street to specific type type = 0 default, type = 1 space ship type  = 2 statellite/cubes, type = 3 asteroids
  • code/branches/OrxyRoad_FS18/src/modules/orxyroad/OrxyRoadShip.cc

    r11981 r11996  
    6262
    6363        Vector3 pos = getPosition();
    64         Vector3 pos1 = getPosition();
     64        //Vector3 pos1 = getPosition();
    6565
    6666        //Movement calculation
     
    7777        if (this->hasLocalController())
    7878        {
    79             float dist_y = velocity.y * dt;
     79            //float dist_y = velocity.y * dt;
    8080            //forward backwards movement
    8181            if(forward){
    82                 if(velocity.y < 200){// Limit for max velocity
    83                     velocity.y += 10;
     82                if(velocity.y < 300){// Limit for max velocity
     83                    velocity.y += 30;
    8484                    forward = false;
    8585                }
     
    8888            }else if(backward){
    8989                if(velocity.y > 10){
    90                      velocity.y -= 10;
     90                     velocity.y -= 30;
    9191                }else {
    9292                    velocity.y = 0; // Prevent players from going backwards
     
    119119            //Left right steering
    120120
     121            if(!steeredLeft&&!steeredRight){
     122                    velocity.x = velocity.x *0.8;
     123            }
    121124
    122125            if(steeredLeft){
    123                 if(true){//if(!forward) Experimental for only allowing steering left and right when
    124                     velocity.x += 5;
     126                steeredLeft = false;
     127                if(velocity.x<100){//if(!forward) Experimental for only allowing steering left and right when
     128                    velocity.x += 6;
    125129                    steeredLeft = false;
    126                 }
    127                
     130                }             
    128131
    129132            }else if(steeredRight) {
    130                 if(true){
    131                     velocity.x += -5;
     133                steeredRight = false;
     134                if(velocity.x>-100){
     135                    velocity.x += -6;
    132136                    steeredRight = false;
    133                 }
     137                }       
    134138            }else {
    135139                if(velocity.x < -2 || velocity.x > 2 ){
Note: See TracChangeset for help on using the changeset viewer.