summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHearto Lazor <heartolazor@gmail.com>2016-04-15 00:13:17 -0300
committerHearto Lazor <heartolazor@gmail.com>2016-04-15 00:13:17 -0300
commit08b93da28aaa3cef006ce6cb13c4e5f7f8d8b5d2 (patch)
treeb8b52cfeed4847085a2750bca7912e254054425a
parentc0576c64da3fb03f63922fa572897b1a80e606e4 (diff)
Fixed curve baking, now always start at origin point
-rw-r--r--scene/resources/curve.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index 7dec4029fc..516156c315 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -543,7 +543,8 @@ void Curve2D::_bake() const {
Vector2 pos=points[0].pos;
List<Vector2> pointlist;
-
+ pointlist.push_back(pos); //start always from origin
+
for(int i=0;i<points.size()-1;i++) {
float step = 0.1; // at least 10 substeps ought to be enough?