-Fixed issue in Kinematicbody2D

This commit is contained in:
Juan Linietsky
2016-09-01 12:03:55 -03:00
parent fc70824f7c
commit 5fc084c28e
9 changed files with 51 additions and 35 deletions

View File

@ -493,12 +493,12 @@ Physics2DTestMotionResult::Physics2DTestMotionResult(){
bool Physics2DServer::_body_test_motion(RID p_body,const Vector2& p_motion,float p_margin,const Ref<Physics2DTestMotionResult>& p_result) {
bool Physics2DServer::_body_test_motion(RID p_body,const Matrix32& p_from,const Vector2& p_motion,float p_margin,const Ref<Physics2DTestMotionResult>& p_result) {
MotionResult *r=NULL;
if (p_result.is_valid())
r=p_result->get_result_ptr();
return body_test_motion(p_body,p_motion,p_margin,r);
return body_test_motion(p_body,p_from,p_motion,p_margin,r);
}
void Physics2DServer::_bind_methods() {
@ -619,7 +619,7 @@ void Physics2DServer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("body_set_force_integration_callback","body","receiver","method","userdata"),&Physics2DServer::body_set_force_integration_callback,DEFVAL(Variant()));
ObjectTypeDB::bind_method(_MD("body_test_motion","body","motion","margin","result:Physics2DTestMotionResult"),&Physics2DServer::_body_test_motion,DEFVAL(0.08),DEFVAL(Variant()));
ObjectTypeDB::bind_method(_MD("body_test_motion","body","from","motion","margin","result:Physics2DTestMotionResult"),&Physics2DServer::_body_test_motion,DEFVAL(0.08),DEFVAL(Variant()));
/* JOINT API */