hzqst / MetaHookSv

MetaHook (https://github.com/nagist/metahook) porting for SvEngine (GoldSrc engine modified by Sven-Coop)
MIT License
149 stars 37 forks source link

[BulletPhysics] TODO m_pInternalRigidBody #475

Closed hzqst closed 3 months ago

hzqst commented 3 months ago

class CFollowConstraintMotionState : public CBulletBaseMotionState {
public:

    CFollowConstraintMotionState(btTypedConstraint* constraint) : m_constraint(constraint) {}

    void getWorldTransform(btTransform& worldTrans) const override {
        if (m_constraint) {
            worldTrans = m_constraint->getRigidBodyA().getWorldTransform();
        }
    }

    void setWorldTransform(const btTransform& worldTrans) override {

    }

    btTypedConstraint* m_constraint{};
};

m_pInternalRigidBody->setCollisionFlags(m_pInternalRigidBody->getCollisionFlags() | btCollisionObject::CF_NO_CONTACT_RESPONSE);