-added custom metadata to physics shapes (2D only for now)
-gizmos are not displayed in camera preview
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user