Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
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。
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