Пример #1
0
bool PhysicsServerSW::body_test_motion(RID p_body, const Transform &p_from, const Vector3 &p_motion, MotionResult *r_result) {

	BodySW *body = body_owner.get(p_body);
	ERR_FAIL_COND_V(!body, false);
	ERR_FAIL_COND_V(!body->get_space(), false);
	ERR_FAIL_COND_V(body->get_space()->is_locked(), false);

	_update_shapes();

	return body->get_space()->test_body_motion(body, p_from, p_motion, body->get_kinematic_margin(), r_result);
}
Пример #2
0
real_t PhysicsServerSW::body_get_kinematic_safe_margin(RID p_body) const {
	BodySW *body = body_owner.get(p_body);
	ERR_FAIL_COND_V(!body, 0);

	return body->get_kinematic_margin();
}