-added custom metadata to physics shapes (2D only for now)

-gizmos are not displayed in camera preview
This commit is contained in:
Juan Linietsky
2014-10-16 00:06:34 -03:00
parent 6e87c80e41
commit 371eac9bef
16 changed files with 86 additions and 6 deletions

View File

@@ -548,6 +548,22 @@ void Physics2DServerSW::body_set_shape_transform(RID p_body, int p_shape_idx, co
body->set_shape_transform(p_shape_idx,p_transform);
}
void Physics2DServerSW::body_set_shape_metadata(RID p_body, int p_shape_idx, const Variant& p_metadata) {
Body2DSW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
body->set_shape_metadata(p_shape_idx,p_metadata);
}
Variant Physics2DServerSW::body_get_shape_metadata(RID p_body, int p_shape_idx) const {
Body2DSW *body = body_owner.get(p_body);
ERR_FAIL_COND_V(!body,Variant());
return body->get_shape_metadata(p_shape_idx);
}
int Physics2DServerSW::body_get_shape_count(RID p_body) const {
Body2DSW *body = body_owner.get(p_body);