m2b-ar-tp2/fish.cpp

12 lines
181 B
C++

#include "fish.h"
void Fish::animate(float dt) {
position += velocity * dt;
}
bool Fish::isCloseTo(const QVector3D &point) {
return position.distanceToPoint(point) < range;
}