Index: code/branches/Presentation_HS16/data/levels/Waypointstest.oxw
===================================================================
--- code/branches/Presentation_HS16/data/levels/Waypointstest.oxw	(revision 11350)
+++ code/branches/Presentation_HS16/data/levels/Waypointstest.oxw	(revision 11350)
@@ -0,0 +1,203 @@
+<LevelInfo
+ name = "Waypoints by ooguz"
+ description = "Level to test Waypoints and Waypointarrow"
+ tags = "test"
+ screenshot = "starstestlevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipWaypoint.oxt")
+  include("templates/spaceshipPirate.oxt")
+?>
+
+<Level>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+<Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+  >
+    <?lua
+      include("includes/pickups.oxi")
+    ?>
+
+    <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" /> <!-- AlphaCentauri.ogg, Mars.ogg-->
+
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+
+    <SpawnPoint position="0,0,100" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipwaypoint />
+
+  
+        <Pawn health=30 position="0,0,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box radarname = "Box 4" >
+        <events>
+          <visibility>
+            <EventListener event="boxtrigger3" />
+          </visibility>
+        </events>
+        <attached>
+            <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
+        </collisionShapes>
+        <controller>
+            <WaypointController team=1>
+            </WaypointController>
+        </controller>
+        <explosion >
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
+    </Pawn>
+
+    <Pawn health=30 position="0,100,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box radarname = "Box 3">
+        <events>
+          <visibility>
+            <EventListener event="boxtrigger2" />
+          </visibility>
+        </events>
+        <attached>
+           <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
+        </collisionShapes>
+        <controller>
+            <WaypointController team=1>
+            </WaypointController>
+        </controller>
+        <explosion >
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
+    </Pawn>
+
+    <Pawn health=30 position="0,200,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box radarname = "Box 2">
+        <events>
+          <visibility>
+            <EventListener event="boxtrigger1" />
+          </visibility>
+        </events>
+        <attached>
+           <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
+        </attached>
+        <controller>
+            <WaypointController team=1>
+            </WaypointController>
+        </controller>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
+        </collisionShapes>
+        <explosion >
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
+    </Pawn>
+
+    <Pawn health=30 position="0,300,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box radarname = "Box 1">
+        <events>
+          <visibility>
+            <EventListener event="flying4" />
+          </visibility>
+        </events>
+        <attached>
+            <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
+        </attached>
+        <collisionShapes>
+           <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
+        </collisionShapes>
+        <controller>
+            <WaypointController team=1>
+            </WaypointController>
+        </controller>
+        <explosion >
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
+    </Pawn>
+
+<!-- @Triggers: boxtrigger1 <-> one   box   destroyed
+                boxtrigger2 <-> two   boxes destroyed
+                boxtrigger3 <-> three boxes destroyed
+                boxtrigger4 <-> four  boxes destroyed  -->
+    <EventTrigger name="boxtrigger4" activations="1" stayactive="true" delay=0.1>
+      <events>
+        <trigger>
+          <EventListener event="box" />
+        </trigger>
+      </events>
+      <EventTrigger name="boxtrigger3" activations="1" stayactive="true" delay=0.1>
+        <events>
+          <trigger>
+            <EventListener event="box" />
+          </trigger>
+        </events>
+        <EventTrigger name="boxtrigger2" activations="1" stayactive="true" delay=0.1>
+          <events>
+            <trigger>
+              <EventListener event="box" />
+            </trigger>
+          </events>
+          <EventTrigger name="boxtrigger1" activations="1" stayactive="true" delay=0.1>
+            <events>
+              <trigger>
+                <EventListener event="box" />
+              </trigger>
+            </events>
+          </EventTrigger>
+        </EventTrigger>
+      </EventTrigger>
+    </EventTrigger>
+
+    <DistanceTrigger name="duball1" position="-1000,-300,700" target="Pawn" distance=700 stayActive="true" delay=1 >
+      <events>
+        <activity>
+          <EventListener event="boxtrigger4" />
+        </activity>
+      </events>
+    </DistanceTrigger>
+
+    <StaticEntity position="-1000,-300,700" collisionType=static>
+      <attached>
+        <Model scale=13 mesh="DuBall1.mesh" position = "-100,0,0"/>
+        <Model scale=13 mesh="DuBall2.mesh" position = "100,0,0"/>
+        <Billboard scale=7 material="Examples/Flare" colour="0.5,0.5,0.5" position = "-100,0,0"/>
+        <Billboard scale=7 material="Examples/Flare" colour="0.5,0.5,0.5" position = "100,0,0"/>
+      </attached>
+      <collisionShapes>
+        <SphereCollisionShape radius="80"            position = "-100,0,0" />
+        <SphereCollisionShape radius="120"           position = "100,0,0" />
+        <BoxCollisionShape    halfExtents="90,25,45" position = "-155,0,40" />
+      </collisionShapes>
+    </StaticEntity>
+
+
+
+
+    <WaypointGroup>
+      <waypoints>
+        <Waypoint position="0,0,0" order=1/>
+        <Waypoint position="100,0,0" order=2/>
+        <Waypoint position="200,0,0" order=3/>
+        <Waypoint position="300,0,0" order=4/>
+        <Waypoint position="400,0,0" order=4/>
+      </waypoints>
+    </WaypointGroup>
+
+    
+
+  </Scene>
+</Level>
Index: code/branches/Presentation_HS16/data/levels/templates/spaceshipWaypoint.oxt
===================================================================
--- code/branches/Presentation_HS16/data/levels/templates/spaceshipWaypoint.oxt	(revision 11350)
+++ code/branches/Presentation_HS16/data/levels/templates/spaceshipWaypoint.oxt	(revision 11350)
@@ -0,0 +1,134 @@
+<Template name=spaceshipwaypoint>
+  <SpaceShip
+   hudtemplate            = spaceshiphud
+   camerapositiontemplate = spaceshipassffcameras
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 3
+
+   health            = 100
+   maxhealth         = 200
+   initialhealth     = 100
+
+   shieldhealth        = 30
+   initialshieldhealth = 30
+   maxshieldhealth     = 50
+   shieldabsorption    = 0.8
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
+
+   primaryThrust     = 100
+   auxilaryThrust    = 30
+   rotationThrust    = 50
+
+   lift = 1;
+   stallSpeed = 220;
+
+   boostPower            = 15
+   boostPowerRate        = 1
+   boostRate             = 5
+   boostCooldownDuration = 10
+
+   shakeFrequency = 15
+   shakeAmplitude = 9
+
+   collisionType     = "dynamic"
+   mass              = 100
+   linearDamping     = 0.7
+   angularDamping    = 0.9999999
+
+   explosionSound = "sounds/Explosion2.ogg"
+  >
+   
+
+    <engines>
+      <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipassffengine />
+      <MultiStateEngine position="-7.6, 0, 0" template=spaceshipassffengine />
+    </engines>
+    <attached>
+      <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale=4 mesh="assff.mesh" />
+      <BlinkingBillboard position="17,-1.5,0" material="Examples/Flare" colour="1.0, 0.5, 0.3" amplitude=0.1 frequency=0.5 quadratic=1 />
+      <BlinkingBillboard position="-17,-1.5,0" material="Examples/Flare" colour="0.5, 1.0, 0.3" amplitude=0.1 frequency=0.5 phase=180 quadratic=1 />
+	<Waypointarrow position="0,0,10"/>
+    </attached>
+    <collisionShapes>
+      <BoxCollisionShape position="0,0,0"      halfExtents="10, 3, 5" />
+      <BoxCollisionShape position="13,-1.3,0"  halfExtents="3, 1, 2" />
+      <BoxCollisionShape position="-13,-1.3,0" halfExtents="3, 1, 2" />
+      <BoxCollisionShape position="0,0,7"      halfExtents="3, 2, 2" />
+      <BoxCollisionShape position="0,0.1,-11"  halfExtents="2.2, 1.8, 6" />
+      <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
+    </collisionShapes>
+    <explosion>
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
+
+
+    
+<?lua
+  include("../includes/weaponSettingsAssff.oxi")
+?>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipassffcameras defaults=0>
+  <SpaceShip>
+    <camerapositions>
+      <CameraPosition position="0,10, 40" drag=true mouselook=true />
+      <CameraPosition position="0,20, 80" drag=true mouselook=true />
+      <CameraPosition position="0,30,120" drag=true mouselook=true />
+    </camerapositions>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipassffengine baseclass=MultiStateEngine>
+  <MultiStateEngine
+   boostfactor    = 2
+
+   speedfront     = 150
+   speedback      =  50
+   speedleftright =  50
+   speedupdown    =  50
+
+   defEngineSndNormal = "sounds/Engine_low.ogg"
+   defEngineSndBoost = "sounds/Engine_high.ogg"
+   
+   accelerationfront     = 500
+   accelerationbrake     = 500
+   accelerationback      =  125
+   accelerationleftright =  125
+   accelerationupdown    =  125
+  >
+    <EffectContainer condition="idle">
+      <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" looping=1 active=false/>
+    </EffectContainer>
+    <EffectContainer condition="not idle">
+      <FadingBillboard mainstate=activity active=false scale=0.1 position="7.6, 0, 9" colour="0.2, 0.65, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.1 position="-7.6, 0, 9" colour="0.2, 0.65, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+    </EffectContainer>
+    <EffectContainer condition="normal or brake">
+
+    </EffectContainer>
+    <EffectContainer condition="normal or boost">
+      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.6, 0, 6" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 0, 6" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+    </EffectContainer>
+    <EffectContainer condition="boost">
+      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.6, 0, 6" colour="0.6, 0.75, 0.8, 0.7" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 0, 6" colour="0.6, 0.75, 0.8, 0.7" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+    </EffectContainer>
+<!--    <EffectContainer condition="brake">
+      <FadingBillboard mainstate=activity active=false scale=0.3 position=" 8, 0, 6" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.3 position="-8, 0, 6" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.15 position=" 8, 0, 6" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.15 position="-8, 0, 6" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
+    </EffectContainer>
+-->
+  </MultiStateEngine>
+</Template>
Index: code/branches/Presentation_HS16/src/modules/CMakeLists.txt
===================================================================
--- code/branches/Presentation_HS16/src/modules/CMakeLists.txt	(revision 11349)
+++ code/branches/Presentation_HS16/src/modules/CMakeLists.txt	(revision 11350)
@@ -44,2 +44,3 @@
 ADD_SUBDIRECTORY(dodgerace)
 ADD_SUBDIRECTORY(hover)
+ADD_SUBDIRECTORY(waypoints)
Index: code/branches/Presentation_HS16/src/modules/waypoints/CMakeLists.txt
===================================================================
--- code/branches/Presentation_HS16/src/modules/waypoints/CMakeLists.txt	(revision 11350)
+++ code/branches/Presentation_HS16/src/modules/waypoints/CMakeLists.txt	(revision 11350)
@@ -0,0 +1,17 @@
+ADD_SOURCE_FILES(WAYPOINTS_SRC_FILES
+
+  Waypointarrow.cc
+  Waypoint.cc
+  WaypointGroup.cc
+)
+
+
+ORXONOX_ADD_LIBRARY(waypoints
+  MODULE
+  FIND_HEADER_FILES
+  LINK_LIBRARIES
+    orxonox
+    overlays
+    objects
+  SOURCE_FILES ${WAYPOINTS_SRC_FILES}
+)
Index: code/branches/Presentation_HS16/src/modules/waypoints/Waypoint.cc
===================================================================
--- code/branches/Presentation_HS16/src/modules/waypoints/Waypoint.cc	(revision 11350)
+++ code/branches/Presentation_HS16/src/modules/waypoints/Waypoint.cc	(revision 11350)
@@ -0,0 +1,60 @@
+#include "Waypoint.h"
+#include <OgreSceneNode.h>
+#include <BulletDynamics/Dynamics/btRigidBody.h>
+#include "util/OrxAssert.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "WaypointGroup.h"
+#include "core/EventIncludes.h"
+
+
+namespace orxonox
+
+
+{
+    RegisterClass(Waypoint);
+
+    Waypoint::Waypoint(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(Waypoint);
+        model = new Model(this->getContext());
+        model->setMeshSource("cube.mesh");  // Name of the arrow file for now bottle
+        this->attach(model);
+        model->setScale(0);
+        //model->setOrientation(Vector3(0,0,-1));
+        model->setPosition(Vector3(0.0,0.0,0.0));        // this is wrong, it has to be triggered
+        waypoint_actived = false;
+        distancetrigger = new DistanceTrigger(this->getContext());
+        distancetrigger->setDistance(100);
+        distancetrigger->addTarget("Pawn");
+        distancetrigger->setStayActive(false);
+        this->addEventSource(distancetrigger, "activate");
+        this->attach(distancetrigger);
+    }
+
+    Waypoint::~Waypoint()
+    {
+    }
+
+
+    void Waypoint::activate(){
+        orxout() << "activate function" << endl;
+        ///++order;
+        waypointgroup->activateNext();
+    }
+
+
+     //WorldEntity::setDirection
+     //WorldEntity::getPosition()
+     //setOrientation()
+
+
+    void Waypoint::XMLEventPort(Element& xmlelement, XMLPort::Mode mode){
+        SUPER(Waypoint, XMLEventPort, xmlelement, mode); // From the SpaceShip.cc file
+        //XMLPortParam(Waypoint, "order", setOrder, getOrder, xmlelement, mode);
+        XMLPortEventState(Waypoint, BaseObject, "activate", activate, xmlelement, mode);
+
+    }
+
+
+}
Index: code/branches/Presentation_HS16/src/modules/waypoints/Waypoint.h
===================================================================
--- code/branches/Presentation_HS16/src/modules/waypoints/Waypoint.h	(revision 11350)
+++ code/branches/Presentation_HS16/src/modules/waypoints/Waypoint.h	(revision 11350)
@@ -0,0 +1,77 @@
+
+
+#ifndef _Waypoint_H__
+#define _Waypoint_H__
+
+#include "OrxonoxPrereqs.h"
+#include "Waypointprereqs.h"
+#include "worldentities/StaticEntity.h"
+#include "graphics/Model.h"
+#include "objects/triggers/DistanceTrigger.h"
+
+#include <map>
+#include <string>
+
+#include "util/OgreForwardRefs.h"
+#include "tools/interfaces/Tickable.h"
+#include "WaypointGroup.h"
+
+
+namespace orxonox
+{
+    /**
+    @brief
+        The StaticEntity is the simplest derivative of the @ref orxonox::WorldEntity class. This means all StaticEntity instances also have
+        a position in space, a mass, a scale, a frication, ... because every StaticEntity is a WorldEntity. You can attach StaticEntities to eachother ike @ref orxonox::WorldEntity WorldEntities.
+
+        In contrast to the MobileEntity the StaticEntity cannot move with respect to the parent to which it is attached. That's why
+        it is called StaticEntity. It will keep the same position (always with respect to its parent) forever unless you call the
+        function @see setPosition to changee it.
+
+        A StaticEntity can only have the collisition type WorldEntity::None or WorldEntity::Static. The collsion types WorldEntity::Dynamic and WorldEntity::Kinematic are illegal.
+    */
+
+    class _OrxonoxExport Waypoint : public StaticEntity {
+        
+        public:
+
+            Waypoint(Context* context);
+            virtual ~Waypoint();
+
+
+            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
+
+            inline void enable_waypoint(){
+                this->waypoint_actived = true;
+            }
+
+            inline void setOrder(int number){
+                this->order = number;
+            }
+
+            inline int getOrder(){
+                return this->order;
+            }
+
+            inline void setWaypointGroup(WaypointGroup* waypointgroup_){
+                this->waypointgroup = waypointgroup_;
+            }
+
+            void activate();
+
+            
+            bool waypoint_actived;
+
+        private:
+    
+            //virtual bool isCollisionTypeLegal(CollisionType type) const override;
+            Model* model;
+            DistanceTrigger* distancetrigger;
+            unsigned int order = 0;
+            WaypointGroup* waypointgroup;
+
+            // network callbacks
+    };
+}
+
+#endif /* _Waypoint_H__ */
Index: code/branches/Presentation_HS16/src/modules/waypoints/WaypointGroup.cc
===================================================================
--- code/branches/Presentation_HS16/src/modules/waypoints/WaypointGroup.cc	(revision 11350)
+++ code/branches/Presentation_HS16/src/modules/waypoints/WaypointGroup.cc	(revision 11350)
@@ -0,0 +1,106 @@
+#include "Waypoint.h"
+
+#include <OgreSceneNode.h>
+#include <BulletDynamics/Dynamics/btRigidBody.h>
+#include "util/OrxAssert.h"
+#include "WaypointGroup.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+
+namespace orxonox
+{
+    RegisterClass(WaypointGroup);
+
+    WaypointGroup::WaypointGroup(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(WaypointGroup);
+        activeWaypoint = nullptr;
+        current = 0;
+
+        //model = new Model(this->getContext());
+        //model->setMeshSource("cube.mesh");  // Name of the arrow file for now bottle
+        //is->attach(model);
+        //model->setScale(3);
+        //model->setOrientation(Vector3(0,0,-1));
+        //model->setPosition(Vector3(0.0,0.0,0.0));        // this is wrong, it has to be triggered
+        //waypoint_active = false;
+        //distancetrigger = new DistanceTrigger(this->getContext());
+        //distancetrigger->setDistance(100);
+        //this->attach(distancetrigger);
+
+    }
+
+    WaypointGroup::~WaypointGroup()
+    {
+    }
+
+
+     //WorldEntity::setDirection
+     //WorldEntity::getPosition()
+     //setOrientation()
+
+
+
+
+    Waypoint* WaypointGroup::getWaypoint(unsigned int index)
+    {
+        unsigned int i = 0;
+        for (Waypoint* child : this->waypoints_)
+        {
+            if (i == index)
+                return child;
+            ++i;
+        }
+        return nullptr;
+    }
+
+    void WaypointGroup::setWaypoint(Waypoint* object)
+    {
+        object->setWaypointGroup(this);
+        this->waypoints_.insert(object);
+    }
+
+    void WaypointGroup::activateNext(){
+        if (std::next(waypoints_.begin(), current) != std::next(waypoints_.end(), 0)){
+          activeWaypoint = *std::next(waypoints_.begin(), current);
+          ++current;
+        }
+    }
+
+    Waypoint* WaypointGroup::getActive(){
+          if (activeWaypoint == nullptr){
+            orxout() << "Null Pointer" << endl;
+            activateNext();
+
+          }
+          return activeWaypoint;
+    }
+
+//    Waypoint* WaypointGroup::activateNext(){
+//        for (Waypoint* object : this->waypoints_){
+//            if(!(object->waypoint_actived)){
+//                //object->enable_waypoint();
+//                activeWaypoint = object;
+//                break;
+//            }
+//        }
+//        return activeWaypoint;
+//    }
+
+ //   Waypoint* WaypointGroup::getFirst(){
+ //       std::set<Waypoint*>::iterator it = waypoints_.begin();
+ //       return *it;
+ //   }
+
+
+
+    void WaypointGroup::XMLPort(Element& xmlelement, XMLPort::Mode mode){
+        SUPER(WaypointGroup, XMLPort, xmlelement, mode); // From the SpaceShip.cc file
+        XMLPortObject(WaypointGroup, Waypoint, "waypoints", setWaypoint, getWaypoint, xmlelement, mode);
+
+    }
+
+
+
+}
Index: code/branches/Presentation_HS16/src/modules/waypoints/WaypointGroup.h
===================================================================
--- code/branches/Presentation_HS16/src/modules/waypoints/WaypointGroup.h	(revision 11350)
+++ code/branches/Presentation_HS16/src/modules/waypoints/WaypointGroup.h	(revision 11350)
@@ -0,0 +1,73 @@
+
+
+#ifndef _WaypointGroup_H__
+#define _WaypointGroup_H__
+
+#include "OrxonoxPrereqs.h"
+#include "Waypointprereqs.h"
+#include "worldentities/StaticEntity.h"
+#include "graphics/Model.h"
+#include "objects/triggers/DistanceTrigger.h"
+
+#include <map>
+#include <string>
+
+#include "core/CoreIncludes.h"
+#include "util/OgreForwardRefs.h"
+#include "Waypoint.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        The StaticEntity is the simplest derivative of the @ref orxonox::WorldEntity class. This means all StaticEntity instances also have
+        a position in space, a mass, a scale, a frication, ... because every StaticEntity is a WorldEntity. You can attach StaticEntities to eachother ike @ref orxonox::WorldEntity WorldEntities.
+
+        In contrast to the MobileEntity the StaticEntity cannot move with respect to the parent to which it is attached. That's why
+        it is called StaticEntity. It will keep the same position (always with respect to its parent) forever unless you call the
+        function @see setPosition to changee it.
+
+        A StaticEntity can only have the collisition type WorldEntity::None or WorldEntity::Static. The collsion types WorldEntity::Dynamic and WorldEntity::Kinematic are illegal.
+    */
+
+    class _OrxonoxExport WaypointGroup : public StaticEntity {
+
+        public:
+
+            WaypointGroup(Context* context);
+            virtual ~WaypointGroup();
+
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+
+        //Waypoint* getWaypoint();
+        Waypoint* getWaypoint(unsigned int index);
+        void setWaypoint(Waypoint* object);
+
+
+        Waypoint* getActive();
+
+
+        void activateNext();
+
+        //Waypoint* getFirst();
+
+
+
+
+
+
+        private:
+
+            //virtual bool isCollisionTypeLegal(CollisionType type) const override;
+
+        std::set<Waypoint*> waypoints_;
+        Waypoint* activeWaypoint;
+        unsigned int current = 0;
+        //std::set<Waypoint*>::iterator it;
+
+            // network callbacks
+    };
+}
+
+#endif /* _Waypoint_H__ */
Index: code/branches/Presentation_HS16/src/modules/waypoints/Waypointarrow.cc
===================================================================
--- code/branches/Presentation_HS16/src/modules/waypoints/Waypointarrow.cc	(revision 11350)
+++ code/branches/Presentation_HS16/src/modules/waypoints/Waypointarrow.cc	(revision 11350)
@@ -0,0 +1,108 @@
+#include "Waypointarrow.h"
+
+#include "util/Convert.h"
+
+#include <OgreSceneNode.h>
+#include <BulletDynamics/Dynamics/btRigidBody.h>
+#include "util/OrxAssert.h"
+#include "core/CoreIncludes.h"
+#include "core/command/ConsoleCommandIncludes.h"
+
+
+namespace orxonox
+{
+    RegisterClass(Waypointarrow);
+    // SetConsoleCommand("Waypointarrow", "toggleArrow", &Waypointarrow::toggleArrow);
+
+
+    Waypointarrow::Waypointarrow(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(Waypointarrow);
+        model = new Model(this->getContext());
+        model->setMeshSource("arrow.mesh");  // Name of the arrow file for now bottle
+        this->attach(model);
+        model->setScale(3);
+       // model->setOrientation(Vector3(0,0,-1));
+        model->setPosition(Vector3(0,15, 0));
+        waypoints_ = nullptr;
+    }
+
+    Waypointarrow::~Waypointarrow()
+    {
+    }
+
+   /*
+    Waypoint* WaypointGroup::getActive(){
+          for (Waypoint* object : this->waypoints_){
+            if(!(object->waypoint_actived)){
+                object->enable_waypoint();
+                return object;
+            }
+        }
+    }
+
+
+    void tick::getActive
+
+
+*/
+
+ /*   void Waypointarrow::toggleArrow(){
+        if(model->getScale() == 3)
+            model->setScale(0);
+        else
+            model->setScale(3);
+    }
+*/
+
+    WaypointGroup* Waypointarrow::getWaypointgroup()
+    {
+        if (waypoints_ == nullptr){
+
+            for (WaypointGroup* group : ObjectList<WaypointGroup>())
+                waypoints_ = group;
+
+        }
+
+        return waypoints_;
+    }
+
+
+
+
+    void Waypointarrow::tick(float dt){
+
+        if (getWaypointgroup() == nullptr){
+                //orxout() << "Second" << endl;
+
+            return;
+        }
+
+        waypoints_ = getWaypointgroup();
+        waypoint = waypoints_->getActive();
+        Vector3 waypoint_position = waypoint->getWorldPosition();
+
+
+        // orxout() << model->scale_ << endl;
+        //orxout() << "waypoint " << waypoint_position.x <<  "waypoint " << waypoint_position.y << "waypoint " << waypoint_position.z << endl;
+        //orxout() << "model " << this->model->getWorldPosition().x <<  "model " << this->model->getWorldPosition().y << "model " << this->model->getWorldPosition().z << endl;
+        //orxout() << "this " << this->getWorldPosition().x <<  "this " << this->getWorldPosition().y << "this " << this->getWorldPosition().z << endl;
+        //orxout() << "trial " << trial.x <<  "trial " << trial.y << "trial " << trial.z << endl;
+
+
+        Vector3 origin = model->getWorldPosition();;
+        model->setDirection( origin - waypoint_position, TransformSpace::World);
+     
+
+    }
+
+    void Waypointarrow::XMLPort(Element& xmlelement, XMLPort::Mode mode){
+        SUPER(Waypointarrow, XMLPort, xmlelement, mode); // From the SpaceShip.cc file
+        //XMLPortParamTemplate(WorldEntity, "orientation", setOrientation, getOrientation, xmlelement, mode, Vector3)
+        //XMLPortObject(SpaceShip, Engine, "engines", addEngine, getEngine, xmlelement, mode); // TRY ADDING THE WAYPOINT ARROW LIKE AN ENGINE
+
+
+    }
+
+
+}
Index: code/branches/Presentation_HS16/src/modules/waypoints/Waypointarrow.h
===================================================================
--- code/branches/Presentation_HS16/src/modules/waypoints/Waypointarrow.h	(revision 11350)
+++ code/branches/Presentation_HS16/src/modules/waypoints/Waypointarrow.h	(revision 11350)
@@ -0,0 +1,59 @@
+
+
+#ifndef _Waypointarrow_H__
+#define _Waypointarrow_H__
+
+#include "OrxonoxPrereqs.h"
+#include "worldentities/StaticEntity.h"
+#include "graphics/Model.h"
+
+#include <string>
+
+#include "util/OgreForwardRefs.h"
+#include "tools/interfaces/Tickable.h"
+#include "interfaces/RadarListener.h"
+#include "WaypointGroup.h"
+#include "core/XMLPort.h"
+
+
+namespace orxonox
+{
+    /**
+    @brief
+        The StaticEntity is the simplest derivative of the @ref orxonox::WorldEntity class. This means all StaticEntity instances also have
+        a position in space, a mass, a scale, a frication, ... because every StaticEntity is a WorldEntity. You can attach StaticEntities to eachother ike @ref orxonox::WorldEntity WorldEntities.
+
+        In contrast to the MobileEntity the StaticEntity cannot move with respect to the parent to which it is attached. That's why
+        it is called StaticEntity. It will keep the same position (always with respect to its parent) forever unless you call the
+        function @see setPosition to changee it.
+
+        A StaticEntity can only have the collisition type WorldEntity::None or WorldEntity::Static. The collsion types WorldEntity::Dynamic and WorldEntity::Kinematic are illegal.
+    */
+
+    class _OrxonoxExport Waypointarrow : public StaticEntity, public Tickable {
+        
+        public:
+
+            Waypointarrow(Context* context);
+            virtual ~Waypointarrow();
+            WaypointGroup* getWaypointgroup();
+
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+
+            virtual void tick(float dt);
+            //static void toogleArrow();
+
+
+
+        private:
+    
+            //virtual bool isCollisionTypeLegal(CollisionType type) const override;
+            Model* model;
+            WaypointGroup* waypoints_;
+            Waypoint* waypoint;
+            // network callbacks
+    };
+}
+
+#endif /* _Waypoint_H__ */
Index: code/branches/Presentation_HS16/src/modules/waypoints/Waypointprereqs.h
===================================================================
--- code/branches/Presentation_HS16/src/modules/waypoints/Waypointprereqs.h	(revision 11350)
+++ code/branches/Presentation_HS16/src/modules/waypoints/Waypointprereqs.h	(revision 11350)
@@ -0,0 +1,55 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Shared library macros, enums, constants and forward declarations for the Waypoint module
+*/
+
+#ifndef _WaypointPrereqs_H__
+#define _WaypointPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+    class Waypoint;
+    class WaypointGroup;
+    class Waypointarrow;
+
+    
+}
+
+#endif /* _WaypointPrereqs_H__ */
Index: code/branches/Presentation_HS16/src/orxonox/worldentities/CMakeLists.txt
===================================================================
--- code/branches/Presentation_HS16/src/orxonox/worldentities/CMakeLists.txt	(revision 11349)
+++ code/branches/Presentation_HS16/src/orxonox/worldentities/CMakeLists.txt	(revision 11350)
@@ -13,4 +13,5 @@
   ExplosionPart.cc
   Actionpoint.cc
+  
 )
 
Index: code/branches/Presentation_HS16/src/orxonox/worldentities/Waypoint.cc
===================================================================
--- code/branches/Presentation_HS16/src/orxonox/worldentities/Waypoint.cc	(revision 11350)
+++ code/branches/Presentation_HS16/src/orxonox/worldentities/Waypoint.cc	(revision 11350)
@@ -0,0 +1,44 @@
+#include "Waypoint.h"
+
+#include <OgreSceneNode.h>
+#include <BulletDynamics/Dynamics/btRigidBody.h>
+#include "util/OrxAssert.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    RegisterClass(Waypoint);
+
+    Waypoint::Waypoint(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(Waypoint);
+        model = new Model(this->getContext());
+        model->setMeshSource("cube.mesh");  // Name of the arrow file for now bottle
+        this->attach(model);
+        model->setScale(3);
+        //model->setOrientation(Vector3(0,0,-1));
+        model->setPosition(Vector3(0.0,0.0,0.0));        // this is wrong, it has to be triggered
+        waypoint_active = false;
+        distancetrigger = new DistanceTrigger(this->getContext());   
+        distancetrigger->setDistance(100);
+        this->attach(distancetrigger);
+    }
+
+    Waypoint::~Waypoint()
+    {
+    }
+
+
+     //WorldEntity::setDirection
+     //WorldEntity::getPosition()
+     //setOrientation()
+
+
+    void Waypoint::XMLPort(Element& xmlelement, XMLPort::Mode mode){
+        SUPER(Waypoint, XMLPort, xmlelement, mode); // From the SpaceShip.cc file
+        XMLPortParam(Waypoint, "order", getOrder, setOrder, xmlelement, mode);
+
+    }
+
+
+}
Index: code/branches/Presentation_HS16/src/orxonox/worldentities/Waypoint.h
===================================================================
--- code/branches/Presentation_HS16/src/orxonox/worldentities/Waypoint.h	(revision 11350)
+++ code/branches/Presentation_HS16/src/orxonox/worldentities/Waypoint.h	(revision 11350)
@@ -0,0 +1,68 @@
+
+
+#ifndef _Waypoint_H__
+#define _Waypoint_H__
+
+#include "OrxonoxPrereqs.h"
+#include "StaticEntity.h"
+#include "graphics/Model.h"
+#include "modules/objects/triggers/DistanceTrigger.h"
+
+#include <map>
+#include <string>
+
+#include "util/OgreForwardRefs.h"
+#include "tools/interfaces/Tickable.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        The StaticEntity is the simplest derivative of the @ref orxonox::WorldEntity class. This means all StaticEntity instances also have
+        a position in space, a mass, a scale, a frication, ... because every StaticEntity is a WorldEntity. You can attach StaticEntities to eachother ike @ref orxonox::WorldEntity WorldEntities.
+
+        In contrast to the MobileEntity the StaticEntity cannot move with respect to the parent to which it is attached. That's why
+        it is called StaticEntity. It will keep the same position (always with respect to its parent) forever unless you call the
+        function @see setPosition to changee it.
+
+        A StaticEntity can only have the collisition type WorldEntity::None or WorldEntity::Static. The collsion types WorldEntity::Dynamic and WorldEntity::Kinematic are illegal.
+    */
+
+    class _OrxonoxExport Waypoint : public StaticEntity {
+        
+        public:
+
+            Waypoint(Context* context);
+            virtual ~Waypoint();
+
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+
+            inline void enable_waypoint(){
+                this->waypoint_active = true;
+            }
+
+            inline void disable_waypoint(){
+                this->waypoint_active = false;
+            }
+
+            inline int getOrder(){
+                return order;
+            }
+
+            
+
+
+        private:
+    
+            //virtual bool isCollisionTypeLegal(CollisionType type) const override;
+            Model* model;
+            DistanceTrigger* distancetrigger;
+            bool waypoint_active;
+            int order;
+            
+            // network callbacks
+    };
+}
+
+#endif /* _Waypoint_H__ */
Index: code/branches/Presentation_HS16/src/orxonox/worldentities/Waypointarrow.cc
===================================================================
--- code/branches/Presentation_HS16/src/orxonox/worldentities/Waypointarrow.cc	(revision 11350)
+++ code/branches/Presentation_HS16/src/orxonox/worldentities/Waypointarrow.cc	(revision 11350)
@@ -0,0 +1,40 @@
+#include "Waypointarrow.h"
+
+#include <OgreSceneNode.h>
+#include <BulletDynamics/Dynamics/btRigidBody.h>
+#include "util/OrxAssert.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    RegisterClass(Waypointarrow);
+
+    Waypointarrow::Waypointarrow(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(Waypointarrow);
+        model = new Model(this->getContext());
+        model->setMeshSource("cokebottle.mesh");  // Name of the arrow file for now bottle
+        this->attach(model);
+        model->setScale(3);
+        //model->setOrientation(Vector3(0,0,-1));
+        model->setPosition(Vector3(0,15,0));
+    }
+
+    Waypointarrow::~Waypointarrow()
+    {
+    }
+
+     
+
+
+    void Waypointarrow::XMLPort(Element& xmlelement, XMLPort::Mode mode){
+        SUPER(Waypointarrow, XMLPort, xmlelement, mode); // From the SpaceShip.cc file
+
+
+        //XMLPortObject(SpaceShip, Engine, "engines", addEngine, getEngine, xmlelement, mode); // TRY ADDING THE WAYPOINT ARROW LIKE AN ENGINE
+ 
+
+    }
+
+
+}
Index: code/branches/Presentation_HS16/src/orxonox/worldentities/Waypointarrow.h
===================================================================
--- code/branches/Presentation_HS16/src/orxonox/worldentities/Waypointarrow.h	(revision 11350)
+++ code/branches/Presentation_HS16/src/orxonox/worldentities/Waypointarrow.h	(revision 11350)
@@ -0,0 +1,52 @@
+
+
+#ifndef _Waypoint_H__
+#define _Waypoint_H__
+
+#include "OrxonoxPrereqs.h"
+#include "StaticEntity.h"
+#include "graphics/Model.h"
+
+#include <map>
+#include <string>
+
+#include "util/OgreForwardRefs.h"
+#include "tools/interfaces/Tickable.h"
+#include "interfaces/RadarListener.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        The StaticEntity is the simplest derivative of the @ref orxonox::WorldEntity class. This means all StaticEntity instances also have
+        a position in space, a mass, a scale, a frication, ... because every StaticEntity is a WorldEntity. You can attach StaticEntities to eachother ike @ref orxonox::WorldEntity WorldEntities.
+
+        In contrast to the MobileEntity the StaticEntity cannot move with respect to the parent to which it is attached. That's why
+        it is called StaticEntity. It will keep the same position (always with respect to its parent) forever unless you call the
+        function @see setPosition to changee it.
+
+        A StaticEntity can only have the collisition type WorldEntity::None or WorldEntity::Static. The collsion types WorldEntity::Dynamic and WorldEntity::Kinematic are illegal.
+    */
+
+    class _OrxonoxExport Waypointarrow : public StaticEntity {
+        
+        public:
+
+            Waypointarrow(Context* context);
+            virtual ~Waypointarrow();
+
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+
+
+
+
+        private:
+    
+            //virtual bool isCollisionTypeLegal(CollisionType type) const override;
+            Model* model;
+            // network callbacks
+    };
+}
+
+#endif /* _Waypoint_H__ */
