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

"Steered wheel" joint from the documentation doesn't work when powered #580

Open
Zeblote opened this issue Jul 3, 2022 · 1 comment
Open

Comments

@Zeblote
Copy link

Zeblote commented Jul 3, 2022

I've noticed a very strange issue trying to use the D6 joint to make a "steered wheel" in Unreal Engine. According to the documentation, this is supposed to be supported:

https://gameworksdocs.nvidia.com/PhysX/4.1/documentation/physxguide/Manual/Joints.html#d6-joint

In vehicle applications, these joints can be used as 'steered wheel' joints in which the child actor is the wheel, free to rotate about its twist axis, while the free swing axis in the parent acts as the steering axis.

However, it seems that when you actually try to do that, it goes crazy when you then try to use the swing drive to steer the wheel.

Here is one such joint set up in Unreal Engine:
image
image
image

This is supposed to make a steered wheel that slowly spins without steering. However, the result is this, flapping about without any input at runtime:

UE4Editor_2022-06-29_19-23-33.mp4

In the end I tracked it down to the swing drive (accidentally?) being computed with the pose of the child actor rather than the parent one. To me this only makes sense for the twist drive, but not the swing one. After making this change: Zeblote@f3d4f0c I am able to control my wheel as intended, using the swing and twist drives separately to steer and drive.

UE4Editor_2022-06-29_22-19-06.mp4

I don't have a good understanding of that code, it would be nice for someone to clarify what the intended behavior is and whether this was a bug.

@kstorey-nvidia
Copy link

Thanks for reporting. I'm going through the code and I think you're right about this being an error. The swing axes should be in bodyA frame while the twist axis should be in body B frame.

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