You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
fix bug
running into infinite loop if distance between two adjacent points in curve are too short.
This commit is contained in:
@@ -553,7 +553,7 @@ void Curve2D::_bake() const {
|
|||||||
if (divs>1)
|
if (divs>1)
|
||||||
divs=1;
|
divs=1;
|
||||||
|
|
||||||
float step = divs*0.1; // 10 substeps ought to be enough?
|
float step = 0.1; // 10 substeps ought to be enough?
|
||||||
float p = 0;
|
float p = 0;
|
||||||
|
|
||||||
while(p<1.0) {
|
while(p<1.0) {
|
||||||
@@ -1026,7 +1026,7 @@ void Curve3D::_bake() const {
|
|||||||
if (divs>1)
|
if (divs>1)
|
||||||
divs=1;
|
divs=1;
|
||||||
|
|
||||||
float step = divs*0.1; // 10 substeps ought to be enough?
|
float step = 0.1; // 10 substeps ought to be enough?
|
||||||
float p = 0;
|
float p = 0;
|
||||||
|
|
||||||
while(p<1.0) {
|
while(p<1.0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user