| 118 | } |
| 119 | |
| 120 | void NavMeshObstacle::syncToNode() |
| 121 | { |
| 122 | if (_tileCache) |
| 123 | { |
| 124 | auto obstacle = _tileCache->getObstacleByRef(_obstacleID); |
| 125 | if (obstacle && obstacle->type == DT_OBSTACLE_CYLINDER) |
| 126 | { |
| 127 | auto& cylinder = obstacle->cylinder; |
| 128 | Vec3 localPos = Vec3(cylinder.pos[0], cylinder.pos[1], cylinder.pos[2]); |
| 129 | if (_owner->getParent()) |
| 130 | _owner->getParent()->getWorldToNodeTransform().transformPoint(localPos, &localPos); |
| 131 | _owner->setPosition3D(localPos); |
| 132 | _radius = cylinder.radius; |
| 133 | _height = cylinder.height; |
| 134 | } |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | void ax::NavMeshObstacle::setRadius(float radius) |
| 139 | { |
nothing calls this directly
no test coverage detected