1

For a long time I have been trying to find a way to extrude a custom shape along a spline in Three.js and setting it's roll/banking. Basically, using THREE.ExtrudeGeometry I came quite far, I have working custom shapes that extrude along my splines (which are of the type THREE.CubicBezierCurve3). However I came across 1 problem. I actually want to have control over the roll (as in Yaw, Pitch and Roll) of my extruded shape. The reason for this is cause I'm trying to create a rollercoaster track from a spline and I need to have control over the banking (for banked-turns etc).

Below, an image of how my testscene currently looks like. In the red circled area you can see how the Three.js extrusion algorithm is automatically banking my shape extrusion. This banking is what I want to be able to control by myself.

In short: I was wondering if is it possible to somehow control the banking of the Three.js ExtrudeGeometry (I guess they call it normals?) per spline node?

The area marked in red show where the shape is getting banked by the extrusion algorithm of Three.js

Joey
  • 176
  • 2
  • 12
  • 1
    I just found I could use an array of THREE.TubeGeometry.FrenetFrames to control the binormals, normals and tangents, so I'm trying to see if I can control the banking with those now – Joey Aug 14 '13 at 21:03
  • cool! you should post an answer/snippet so people can vote on it. – George Profenza Aug 17 '13 at 23:33
  • Unfortunately, I haven't really figured out how it works yet, but if I do I will :P – Joey Aug 18 '13 at 11:25
  • If it helps, I had a hacky approach for a simpler path traversal [here](http://stackoverflow.com/questions/15774796/three-curvepath-and-custom-markers/15864060#15864060) – George Profenza Aug 18 '13 at 11:54

0 Answers0