Matthew-J-Spencer / Trajectory-Line-Unity

A powerful trajectory line for Unity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Performance improvements

brogan89 opened this issue · comments

Thanks for this code, was very helpful.

However, one thing I'm stuck on is the performance. Since the simulation instantiates and destroys a gameObject each phase it's really taxing. I've tried a caching solution but it doesn't seem to be helping. The trajectory prediction goes all over the place.

I'm wondering if you have any ideas on how performance could be improved.
Maybe putting the simulation within a Coroutine/UniTask to iterate over per cycle rather than every frame?