Repro: Babylon.js Playground
Motivation: The current Trailmesh does not update the trail correctly when the generator mesh changes its position in one frame. Coupled with long trails, short paths and moving targets, this creates incoherent visuals breaking the effect where trail vertices are distorted due to the sudden change in generator position.
Proposal: Add a public reset
function to the trailMesh class to allow trail vertices to reset to generator position.
Desired result: uncomment line 132 in above PG: trail.reset();
to see the difference.
Erm, basically, I just need approval to submit a PR for a reset
function in the TrailMesh class. Not sure if reset
is good enough for a function name or I should use a different name, since its kinda generic. Also, not sure if my approach towards the reset is correct, I’m just updating all position and normals to the first segment’s.
I’m open to ideas and feedback, lemme know. Thanks for reading!