Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DistanceJoint2D 有bug? #2860

Closed
qinaddspace opened this issue Feb 22, 2024 · 1 comment
Closed

DistanceJoint2D 有bug? #2860

qinaddspace opened this issue Feb 22, 2024 · 1 comment

Comments

@qinaddspace
Copy link

qinaddspace commented Feb 22, 2024

版本是3.7 3.8 都测试过。 添加 DistanceJoint2D 组件,必须先要 enable = false ,否则关节连接不起来。。修改后,可运行代码如下
let join = this.node.addComponent(DistanceJoint2D)
join.enabled =false
join.connectedBody = connectNode.getComponent(RigidBody2D);
join.connectedAnchor.x = 0
join.connectedAnchor.y = 0
join.autoCalcDistance =true
join.maxLength = 300
join.enabled =true

@MrKylinGithub
Copy link
Contributor

请到引擎仓库提交 issue,谢谢!
https://github.com/cocos/cocos-engine/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants