Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 20, 2017, 4:05:27 PM (7 years ago)
Author:
zarron
Message:

first atempt to set dir of fireballs correctly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc

    r11575 r11577  
    3939#include "graphics/Camera.h"
    4040#include "graphics/ParticleSpawner.h"
     41#include <OgreMath.h>
    4142
    4243#include "SOBMushroom.h"
     
    156157
    157158        else if (fireball != nullptr && !(fireball->hasCollided_)){
    158             this-> die();
     159            //this-> die();
    159160        }
    160161
     
    197198            ball->addTemplate("fireball");
    198199            ball->setPosition(spawnpos);
    199            
     200            bool direction = ((this->getWorldOrientation().getRoll().valueRadians())>-1.6&&(this->getWorldOrientation().getRoll().valueRadians()<1.6));
     201            ball->setDirection(direction);
     202            orxout() << "Rotation: " << this->getWorldOrientation().getRoll() << " direction: "<< direction <<endl;
     203            //ball->
     204
    200205        }
    201206     }
Note: See TracChangeset for help on using the changeset viewer.