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

Add support for collision contact points and normals #1107

Merged
merged 1 commit into from Oct 24, 2023

Conversation

kevzettler
Copy link
Contributor

This Pr updates the physics pipeline to expose collision contact points and normals. Still testing this but opening it up for review and discussion.

@kevzettler
Copy link
Contributor Author

Ok looking legit on the points data

contactvid.mp4

Ok some testing. rendering a yellow sphere anywhere one of the collision points like

    Collision::subscribe(move |msg| {
        for position in &msg.points {
            Sphere {
                ..Sphere::suggested()
            }
            .make()
            .with_merge(
                Transformable {
                    optional: TransformableOptional {
                        translation: Some(*position),
                        scale: Some(Vec3::ONE),
                        rotation: Some(Quat::IDENTITY),
                    },
                    ..Transformable::suggested()
                }
                .make(),
            )
            .with(name(), "DebugMarker".to_string())
            .with(self::color(), vec4(1., 0.7, 0., 1.0))
            .spawn();
        }
        }
     ```

Copy link
Contributor

@FredrikNoren FredrikNoren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! This looks great to me; @philpax any thoughts?

@FredrikNoren FredrikNoren merged commit 4aeb98b into AmbientRun:main Oct 24, 2023
14 checks passed
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 this pull request may close these issues.

None yet

2 participants