diff options
-rw-r--r-- | demos/2d/motion/engine.cfg | 7 | ||||
-rw-r--r-- | servers/physics_2d/physics_2d_server_wrap_mt.h | 2 | ||||
-rw-r--r-- | tools/editor/animation_editor.cpp | 10 |
3 files changed, 17 insertions, 2 deletions
diff --git a/demos/2d/motion/engine.cfg b/demos/2d/motion/engine.cfg index 064de6b331..261111904c 100644 --- a/demos/2d/motion/engine.cfg +++ b/demos/2d/motion/engine.cfg @@ -2,3 +2,10 @@ name="Motion Test" main_scene="res://motion.scn" + +[display] + +width=800 +height=600 +stretch_mode="2d" +stretch_aspect="keep" diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.h b/servers/physics_2d/physics_2d_server_wrap_mt.h index 48382498ef..0ddc8f16ec 100644 --- a/servers/physics_2d/physics_2d_server_wrap_mt.h +++ b/servers/physics_2d/physics_2d_server_wrap_mt.h @@ -224,7 +224,7 @@ public: bool body_test_motion(RID p_body,const Vector2& p_motion,float p_margin=0.001,MotionResult *r_result=NULL) { ERR_FAIL_COND_V(main_thread!=Thread::get_caller_ID(),false); - return body_test_motion(p_body,p_motion,p_margin,r_result); + return physics_2d_server->body_test_motion(p_body,p_motion,p_margin,r_result); } /* JOINT API */ diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp index 36fb6fb5f8..bb6f7e9a6f 100644 --- a/tools/editor/animation_editor.cpp +++ b/tools/editor/animation_editor.cpp @@ -1327,8 +1327,16 @@ void AnimationKeyEditor::_track_editor_draw() { float time = animation->track_get_key_time(idx,i); if (time<keys_from) continue; - if (time>keys_to) + if (time>keys_to) { + + if (first && i>0 && animation->track_get_key_value(idx,i)==animation->track_get_key_value(idx,i-1)) { + //draw whole line + te->draw_line(ofs+Vector2(name_limit,y+h/2),ofs+Point2(settings_limit,y+h/2),color); + } + break; + } + float x = key_hofs + name_limit + (time-keys_from)*zoom_scale; Ref<Texture> tex = type_icon[tt]; |