JohnK Posted April 24, 2015 Share Posted April 24, 2015 Having created three Bezier curves Attempt 1var curve_0 = BABYLON.Curve3.CreateCubicBezier(start_0, control1_0, control2,_0 destination_0, nb_of_points);var curve_1 = BABYLON.Curve3.CreateCubicBezier(start_1, control1_1, control2,_1 destination_1, nb_of_points);var curve_2 = BABYLON.Curve3.CreateCubicBezier(start_2, control1_2, control2,_2 destination_2, nb_of_points);I then formed a new curve by joining them together using.var myFullCurve = curve_0.continue(curve_1).continue(curve_2);However as start_1 and start_2 where not the origin (0,0,0) myFullCurve had kinks in it. By ensuring that curve_1 and curve_2 started at (0,0,0) using Attempt 2var curve_0 = BABYLON.Curve3.CreateCubicBezier(start_0, control1_0, control2,_0 destination_0, nb_of_points);var curve_1 = BABYLON.Curve3.CreateCubicBezier(start_1.subtract(start_1), control1_1.subtract(start_1), control2_1.subtract(start_1), destination_1.subtract(start_1), nb_of_points);var curve_2 = BABYLON.Curve3.CreateCubicBezier(start_2.subtract(start_2), control1_2.subtract(start_2), control2_2.subtract(start_2), destination_2.subtract(start_2), nb_of_points);I obtained a continuous curve. I read in this topic that there was a suggestion by Jerome to .... imagine you've got many curves with different origins and you want to "stick" them together one after the other without knowing/handling each curve origin and end. and gathered from the date (16 Mar 2015) curve3 and continue are recent additions. Now using subtract.start to create the curve does not require you to know start but you do have to handle it. Have I misunderstood something or applied continue incorrectly or was it the intention that something like Attempt 1 should have formed a continuous curve and does not as yet do so? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.