| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| adAxis = data.adAxis; | ||
| wsAxis = data.wsAxis; | ||
|
|
||
| // If a control axis was changed, reset its old velocity |
There was a problem hiding this comment.
This would be better handled in an update method by checking the oldData parameter:
if (oldData.adAxis !== this.data.adAxis) { velocity[oldData.adAxis] = 0; }
Sorry, something went wrong.
|
Thanks so much for submitting. I suggested a slightly different approach. |
Sorry, something went wrong.
|
Makes sense! Didn't realize there was an 'oldData' that could be accessed haha. |
Sorry, something went wrong.
|
Your approach is implemented! ✔️ |
Sorry, something went wrong.
|
Thanks. Just edited to reformat and reword comment. Congrats on your first contribution 🎖️ |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
In 1.3.0, if the WS or AD axes is changed during runtime, the old velocity associated with the last axis 'sticks' to the entity, resulting in often unwanted, constant movement. This change clears that velocity when the WS or AD axes are adjusted to a new value.
The script now monitors if the WS or AD axis is dynamically changed (via previous value variable) and clears the velocity value associated with its previous axis when a change occurs during an update. The nature of this stop is not smoothed, however... leaving that resolution to the future.