Hi,
I’m creating a little game where i’m having my camera follow around the player in a 3rd person view.
The player also leaves a trailing line behind everywhere that he went.
I’m rendering this line by keeping track of the positions that the player has turned at, saving those in an array and updating the geometry of my Line according to this array, this was all working smoothly, but i’ve stumbled upon some weird culling issues, where the line would get culled whenever one of the points of the line is outside of the near plane of the camera, but since the other point is clearly within the plane, shouldn’t the line be rendered (partly) anyway ?
I’ve made a fiddle to demonstrate : https://jsfiddle.net/v40z9yot/2/
the red line consists of two points :
const points = [
0,0,0,
0,0,20
]
and renders like i would expect, however, when i change one of the points to be far outside of the camera near plane (and the other still within it) the line doesn’t render anymore ?
Setting frustumCulled to false on the line also doesn’t have any effect, aswell as recalculating the boundingBoxes from the geometry.
Is this expected and should i change my approach as to rendering a trailing line behind the player ?
Any help would be appreciated!