-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Allow the 3D physics behavior to use meshes #8080
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
Conversation
|
JoltPhysics.js v1.0.0 is out |
|
Thank you but this is unrelated to this PR, we will upgrade later in a different PR/issue. |
| const [gltf, setGltf] = React.useState<GLTF | null>(null); | ||
| const loadGltf = React.useCallback( | ||
| async (modelResourceName: string) => { | ||
| if (!modelResourceName && object.getType() === 'Scene3D::Model3DObject') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we could do something on the Object base class for this?
Much like we have in ObjectConfiguration:
getAnimationsCount
getAnimationName
we could have something like:
has3dModelPropertyName
get3dModelPropertyName
so you can do:
objectConfiguration.getProperties().get(objectConfiguration.get3dModelPropertyName()).getValue()
and
if (!modelResourceName && object.getConfiguration().has3dModelPropertyName())
and so any object in the future could expose a 3D model that could be used as a collision mesh?
| )} | ||
| {shape === 'Box' && ( | ||
| </ResponsiveLineStackLayout> | ||
| {shape === 'Mesh' && object.getType() !== 'Scene3D::Model3DObject' && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as the other, might be worth exposing this on the object configuration base class.

Uh oh!
There was an error while loading. Please reload this page.