commit
53b952f351
|
@ -541,19 +541,12 @@ void Curve2D::_bake() const {
|
||||||
|
|
||||||
|
|
||||||
Vector2 pos=points[0].pos;
|
Vector2 pos=points[0].pos;
|
||||||
int point=0;
|
|
||||||
float ofs=0;
|
|
||||||
List<Vector2> pointlist;
|
List<Vector2> pointlist;
|
||||||
|
|
||||||
|
|
||||||
for(int i=0;i<points.size()-1;i++) {
|
for(int i=0;i<points.size()-1;i++) {
|
||||||
|
|
||||||
float slen=points[i].pos.distance_to(points[i+1].pos);
|
float step = 0.1; // at least 10 substeps ought to be enough?
|
||||||
float divs = slen / bake_interval;
|
|
||||||
if (divs>1)
|
|
||||||
divs=1;
|
|
||||||
|
|
||||||
float step = divs*0.1; // 10 substeps ought to be enough?
|
|
||||||
float p = 0;
|
float p = 0;
|
||||||
|
|
||||||
while(p<1.0) {
|
while(p<1.0) {
|
||||||
|
@ -1014,19 +1007,12 @@ void Curve3D::_bake() const {
|
||||||
|
|
||||||
|
|
||||||
Vector3 pos=points[0].pos;
|
Vector3 pos=points[0].pos;
|
||||||
int point=0;
|
|
||||||
float ofs=0;
|
|
||||||
List<Plane> pointlist;
|
List<Plane> pointlist;
|
||||||
pointlist.push_back(Plane(pos,points[0].tilt));
|
pointlist.push_back(Plane(pos,points[0].tilt));
|
||||||
|
|
||||||
for(int i=0;i<points.size()-1;i++) {
|
for(int i=0;i<points.size()-1;i++) {
|
||||||
|
|
||||||
float slen=points[i].pos.distance_to(points[i+1].pos);
|
float step = 0.1; // at least 10 substeps ought to be enough?
|
||||||
float divs = slen / bake_interval;
|
|
||||||
if (divs>1)
|
|
||||||
divs=1;
|
|
||||||
|
|
||||||
float step = divs*0.1; // 10 substeps ought to be enough?
|
|
||||||
float p = 0;
|
float p = 0;
|
||||||
|
|
||||||
while(p<1.0) {
|
while(p<1.0) {
|
||||||
|
|
Loading…
Reference in New Issue