m2b-ar-tp2/fish.cpp

12 lines
181 B
C++
Raw Normal View History

2021-10-06 19:49:42 +02:00
#include "fish.h"
void Fish::animate(float dt) {
position += velocity * dt;
}
bool Fish::isCloseTo(const QVector3D &point) {
return position.distanceToPoint(point) < range;
}