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

DTriCallback is unused #76

Closed
Gaming32 opened this issue Nov 27, 2022 · 8 comments · Fixed by #77
Closed

DTriCallback is unused #76

Gaming32 opened this issue Nov 27, 2022 · 8 comments · Fixed by #77
Assignees

Comments

@Gaming32
Copy link

After setting up a DTriCallback, I found that it does nothing. Looking into the code, it's never called.

@Gaming32
Copy link
Author

Looking a bit more into this, is this covered by #5?

@tzaeschke
Copy link
Owner

Yes, it would be covered by #5, except that this is unlikely to happen anytime soon (unless someone volunteers to do it).

Maybe you can use DTriRayCallback instead?

@tzaeschke
Copy link
Owner

I do not know the reason for this, it maybe an oversight. I think it may be easy to implement. Do you have a good workaround.

While it should be easy to do, it would be another deviation from the original ODE, which I try to keep at a minimum. If you cannot find a good + easy workaround, let me know and we can add it.

@Gaming32
Copy link
Author

I did find a workaround. I separated my existing trimesh into separate trimeshes for each collision type, so I can check which trimesh was collided with to get the collision type, as opposed to looking up the collision type for the specific tri I collide with.

@Gaming32
Copy link
Author

The biggest problem, in my opinion, is that Callback is a required argument for creating a DTriMesh, but then it's unused.

@tzaeschke tzaeschke self-assigned this Nov 30, 2022
@tzaeschke
Copy link
Owner

tzaeschke commented Nov 30, 2022

@Gaming32 I implemented a fix + tests, can you have a look whether it works for you? PR: #77

@tzaeschke tzaeschke linked a pull request Nov 30, 2022 that will close this issue
@tzaeschke
Copy link
Owner

The biggest problem, in my opinion, is that Callback is a required argument for creating a DTriMesh, but then it's unused.

You should be able to use OdeHelper.createTriMesh(space, data, null, null, null);.

@tzaeschke
Copy link
Owner

Trimesh callbacks have been implemented (except ArrayCallback, which has been deprecated).
OdeHelper now has a method to create trimeshes withou requiring callback arguments.
See PR #77

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

Successfully merging a pull request may close this issue.

2 participants