Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release new version #123

Merged
merged 13 commits into from
Feb 13, 2024
3 changes: 1 addition & 2 deletions Assets/UnitySensors/Editor/LiDAR/ScanPatternGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ private void GenerateFromSpecification()
int index = 0;
for (int azimuth = 0; azimuth < _azimuthAngleResolution; azimuth++)
{
if (_direction == Direction.CCW) azimuth = _azimuthAngleResolution - 1 - azimuth;
float azimuthAngle = Mathf.Lerp(_minAzimuthAngle, _maxAzimuthAngle, (float)azimuth / _azimuthAngleResolution);
float azimuthAngle = Mathf.Lerp(_minAzimuthAngle, _maxAzimuthAngle, (float)(_direction == Direction.CW ? azimuth : _azimuthAngleResolution - 1 - azimuth) / _azimuthAngleResolution);
foreach (float zenithAngle in _zenithAngles)
{
scan.scans[index] = Quaternion.Euler(-zenithAngle, azimuthAngle, 0) * Vector3.forward;
Expand Down
Loading
Loading