| 113 | } |
| 114 | |
| 115 | void NavMeshBaseTestDemo::onTouchesMoved(const std::vector<ax::Touch*>& touches, ax::Event* event) |
| 116 | { |
| 117 | if (touches.size() && _camera) |
| 118 | { |
| 119 | auto touch = touches[0]; |
| 120 | auto delta = touch->getDelta(); |
| 121 | |
| 122 | _angle -= AX_DEGREES_TO_RADIANS(delta.x); |
| 123 | _camera->setPosition3D(Vec3(100.0f * sinf(_angle), 50.0f, 100.0f * cosf(_angle))); |
| 124 | _camera->lookAt(Vec3(0.0f, 0.0f, 0.0f), Vec3(0.0f, 1.0f, 0.0f)); |
| 125 | |
| 126 | if (delta.lengthSquared() > 16) |
| 127 | { |
| 128 | _needMoveAgents = false; |
| 129 | } |
| 130 | } |
| 131 | touchesMoved(touches, event); |
| 132 | } |
| 133 | |
| 134 | void NavMeshBaseTestDemo::onTouchesEnded(const std::vector<ax::Touch*>& touches, ax::Event* event) |
| 135 | { |
nothing calls this directly
no test coverage detected