void DampedSpringJoint2D::set_damping(real_t p_damping) { damping=p_damping; update(); if (get_joint().is_valid()) Physics2DServer::get_singleton()->damped_string_joint_set_param(get_joint(),Physics2DServer::DAMPED_STRING_DAMPING,p_damping); }
void DampedSpringJoint2D::set_stiffness(real_t p_stiffness) { stiffness=p_stiffness; update(); if (get_joint().is_valid()) Physics2DServer::get_singleton()->damped_string_joint_set_param(get_joint(),Physics2DServer::DAMPED_STRING_STIFFNESS,p_stiffness); }
void DampedSpringJoint2D::set_rest_length(real_t p_rest_length) { rest_length = p_rest_length; update(); if (get_joint().is_valid()) Physics2DServer::get_singleton()->damped_string_joint_set_param(get_joint(), Physics2DServer::DAMPED_STRING_REST_LENGTH, p_rest_length ? p_rest_length : length); }
void PinJoint2D::set_softness(real_t p_softness) { softness = p_softness; update(); if (get_joint().is_valid()) Physics2DServer::get_singleton()->pin_joint_set_param(get_joint(), Physics2DServer::PIN_JOINT_SOFTNESS, p_softness); }
void b2d_joint_set_target(int id, double x, double y) { get_joint(b2djoint, id); if (b2djoint->joint->GetType() != e_mouseJoint) { // return; } b2MouseJoint* mouseJoint = (b2MouseJoint*)b2djoint->joint; mouseJoint->SetTarget(b2Vec2(x, y)); }
void b2d_joint_delete(int id) { get_joint(b2djoint, id); delete b2djoint; }