Skip to content

Bug in ScanPatternGenerator.cs #105

@Autumn60

Description

@Autumn60

for (int azimuth = 0; azimuth < _azimuthAngleResolution; azimuth++)
{
if (_direction == Direction.CCW) azimuth = _azimuthAngleResolution - 1 - azimuth;
float azimuthAngle = Mathf.Lerp(_minAzimuthAngle, _maxAzimuthAngle, (float)azimuth / _azimuthAngleResolution);
foreach (float zenithAngle in _zenithAngles)
{
scan.scans[index] = Quaternion.Euler(-zenithAngle, azimuthAngle, 0) * Vector3.forward;
index++;
}
}

Loop variables "azimuth" is rewritten in the for statement. (Line 176)
This will cause an error when "_direction" value is set to "Direction.CCW".

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions