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

Beta release of JointComponent #7135

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Beta release of JointComponent #7135

wants to merge 4 commits into from

Conversation

willeastcott
Copy link
Contributor

@willeastcott willeastcott commented Nov 23, 2024

Releases the JointComponent API in beta. For anyone with physics experience, please take a look and offer your thoughts/comments.

Also added a new rope bridge engine example:

rope-bridge.mp4

API reference:

image

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

@willeastcott willeastcott added feature area: physics Physics related issue labels Nov 23, 2024
@willeastcott willeastcott self-assigned this Nov 23, 2024
@LeXXik
Copy link
Contributor

LeXXik commented Nov 25, 2024

I always welcome a constraints component, which I think was missing for a while. There are so many cases where it could be used for interactivity. However, I am not sure of the design. Not that it is wrong, but that there is no definite standard for it so far, so it is up to discussion.

For example, if the ball falling on the bridge disables an entity it touches, then I would expect the bridge would behave as if it would have been cut in the middle. However, that is not the case, since a constraint is its own entity and lives its own life. The bridge would probably fall apart with a constraint still alive that is very soft, like a chewing gum.

Also, I remember making a game for one company, where you would draw a wheel for a vehicle to traverse a terrain. Once you drew a wheel, it would replace the old one, which was connected with a hinge constraint. There was an Ammo crash, when PlayCanvas was trying to destroy a rigidbody (due to hierarchy change) before the constraint. There should be a test case to cover that at least.

@willeastcott
Copy link
Contributor Author

@LeXXik The main things I'm still unsure of related to the following:

  • Should I collapse the X, Y, Z number properties into Vec3 properties? e.g. angularDampingX, angularDampingY and angularDampingZ becomes angularDamping. This will collapse the API into something much simpler, of course. But I'm wondering whether this might be annoying if you only are concerned with configuring a one or maybe two axes. Maybe there'd be other down sides I'm not considering?
  • The current implementation just wraps the btGeneric6DofSpringConstraint. Ammo has specific classes for handling other joint types (like hinge, ball-socket, etc). I'm wondering if those specialized joint types are more stable than the generic 6dof joint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: physics Physics related issue feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants