summaryrefslogtreecommitdiff
path: root/gaunt01/src/bird.h
diff options
context:
space:
mode:
Diffstat (limited to 'gaunt01/src/bird.h')
-rw-r--r--gaunt01/src/bird.h32
1 files changed, 28 insertions, 4 deletions
diff --git a/gaunt01/src/bird.h b/gaunt01/src/bird.h
index abcd66f..026da72 100644
--- a/gaunt01/src/bird.h
+++ b/gaunt01/src/bird.h
@@ -26,6 +26,15 @@
MAKING THE BIRD CHASE THE PLAYERS
+
+ find distance to edge of play - alter turn behaviour depending on how bird needs to head
+ detect player in FOV
+ turn & swoop
+ pick player and remove
+
+ planes frustrum belongs to camera
+ bird checks ray dist to planes
+ avoids nearest +ve
*/
@@ -34,23 +43,37 @@
#include "normBindTexture.h"
#include "player.h"
+#include "ofxRay.h"
class bird
{
public:
bird();
virtual ~bird();
- void update(const map<int,player>& players);
+ void update(map<int,player>& players,float angle);
void draw();
void drawShadow();
+ void drawDebug();
string currentseq;
morphmesh model;
+
+ ofRay pointer;
+ ofVec3f position;
+
+ vector<float> playang;
+ vector<float> playhead;
+ vector<float> playdip;
+ vector<float> playdist;
+ vector<ofVec3f> playpos;
+
+ float heading;
+
protected:
private:
-
- ofVec3f position;
- float heading;
+
+ float fieldofview;
+
ofVec3f direction;
float velocity; //per second
@@ -61,6 +84,7 @@ class bird
ofImage texture;
+
};