cocos-engine icon indicating copy to clipboard operation
cocos-engine copied to clipboard

Use Bullet system ConfigurableConstraint Component, angularDriverSettings.targetOrientation setting will be a fixed orientation.

Open tangkaikk opened this issue 1 year ago • 2 comments

Cocos Creator version

3.x

System information

CocosEditor, Browser

Issue description

Use Bullet system ConfigurableConstraint Component, when angularDriverSettings.targetOrientation setting, the object will be a fixed orientation.

Relevant error log output

none

Steps to reproduce

1.Use Bullet system ConfigurableConstraint Component 2.Set angularDriverSettings.targetOrientation z Axis,normally , z is positive the car wheel will turn left,z is negative the car wheel will turn right, but during testing, no matter z is positive or negative, the car wheel is turn one side. After logging in the code, the code call bt.Generic6DofSpring2Constraint_setTargetVelocity function to adjust the wheel orientation。 3.Change physic system from bullet to physX, the car can turn left and right while setting angularDriverSettings.targetOrientation z value。

1.使用bullet物理系统 configurableConstraint 2.设置angularDriverSettings.targetOrientation,主要是z,理论上z为正轮子向左,z为负轮子向右, 但是测试结果物理z是正数或者负数都是向一边。打印log跟踪bullet系统最终调用Generic6DofSpring2Constraint_setTargetVelocity来设置转向数值。 3.把物理系统从bullet改为physX则能根据z正负数来向左和向右。

Minimal reproduction project

race3dCopy.zip

tangkaikk avatar Jul 05 '24 07:07 tangkaikk

I've dipped into this issue, but could not resolve it.

minggo avatar Oct 17 '24 02:10 minggo

Could you refer the physX system code to adjust the bullet system behavior?

tangkaikk avatar Oct 17 '24 03:10 tangkaikk