# Wrong tangent at the end of the curve

**URL:** <https://discourse.threejs.org/t/wrong-tangent-at-the-end-of-the-curve/49156>\
**Category:** Questions\
**Tags:** curve, tangent\
**Created:** [March 16, 2023, 8:33am UTC](https://discourse.threejs.org/t/wrong-tangent-at-the-end-of-the-curve/49156 "2023-03-16T08:33:46Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![PavelBoytchev](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/pavelboytchev/32/38639_2.png) [@PavelBoytchev](https://discourse.threejs.org/u/PavelBoytchev)\
**Post date:** [March 22, 2023, 7:35am UTC](https://discourse.threejs.org/t/wrong-tangent-at-the-end-of-the-curve/49156/4 "2023-03-22T07:35:53Z")

</div>

Could you make a simpler example with pure TubeGeometry (i.e. without all the custom modifications like holes, etc).

In the past I had a problem with the end points of some spline curves, and I found it was due to some strange code in Three.js – it was something like “if this vector is too short, assume it is (0,1,0)”. I tried to find this code, but failed. It is either fixed, or my memory is malfunctioning. If I debug a shorter example I might be able to recover my memories. Maybe just a code fragment with how you define the curve and the tube would be sufficient to start with.

---

_[View the full topic](https://discourse.threejs.org/t/wrong-tangent-at-the-end-of-the-curve/49156)._
