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

feat(physics): add optional range to raycasts #798

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

philpax
Copy link
Contributor

@philpax philpax commented Sep 5, 2023

This is a fairly uncontroversial change, except for the part where it doesn't actually work - the physics example doesn't produce any raycast results with a set distance, even when the cube is obviously within 5 -Z units of the ground.

I tried chucking in a dbg! to see what the range being passed into the raycast was:
image
but that results in the runtime crashing on startup:

[2023-09-05T16:55:26Z INFO  ambient_audio::stream] Audio stream config: StreamConfig { channels: 2, sample_rate: SampleRate(48000), buffer_size: Default }
[2023-09-05T16:55:26Z INFO  minidumper::ipc::server] captured minidump

@FredrikNoren did you use f32::MAX for a specific reason? Any FFI nasal demons I should be aware of?

@FredrikNoren
Copy link
Contributor

@philpax Hm strange. Don't think there's any FFI thing, think the c++ physx examples just use MAX too

@FredrikNoren
Copy link
Contributor

@philpax Wait I think I get the minidump thing on all startups, even without this change

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.

2 participants