magnificus / Procedural-Cities

master thesis
MIT License
623 stars 146 forks source link

Looping 360 the same value when calculation best rotation for initial FRoadSegment #12

Closed TQwan closed 6 years ago

TQwan commented 6 years ago

Hi,

First of, what a great project!

I think I found a small bug though.

When you spawn the initial road in Spawner.cpp You rotate 360 degrees to find the best rotation for the initial segment, however it doesn't use the calculated variable 'Testpoint'.

So currently it loops 360 times around point 0,0. Which is pretty pointless (sorry couldn't resist the pun ;) )

Anyway this line: https://github.com/magnificus/Procedural-Cities/blob/9dd8a75e143aaccc914eaaf48253b4946eb99e49/Source/City/Spawner.cpp#L370

All 'point' should be 'testPoint'. (also the line below it ofc)

Sidenote: Also NoiseSingleton::getInstance()->noise( is called twice, it might be better to store it in a temporary value to improve performance.

magnificus commented 6 years ago

Hah, you're right, I'll change that, thanks! Like I said before, this project is so unpolished that these problems don't really surprise me :).