-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Feature/inflatable rigid bodies #176
Conversation
# Conflicts: # src/components/super-cursor.js
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.
The _isInteractable
check is a bit concerning to me, and I want to make sure the .meta file is actually intentionally checked in. Other than that lgtm.
@@ -0,0 +1 @@ | |||
{"asset":{"generator":"FBX2glTF","version":"2.0"},"scene":0,"buffers":[{"byteLength":18600,"uri":"buffer.bin"}],"bufferViews":[{"buffer":0,"byteLength":3336,"byteOffset":0,"target":34963},{"buffer":0,"byteLength":5724,"byteOffset":3336,"target":34962},{"buffer":0,"byteLength":5724,"byteOffset":9060,"target":34962},{"buffer":0,"byteLength":3816,"byteOffset":14784,"target":34962}],"scenes":[{"name":"Root Scene","nodes":[0]}],"accessors":[{"componentType":5123,"type":"SCALAR","count":1668,"bufferView":0,"byteOffset":0},{"componentType":5126,"type":"VEC3","count":477,"bufferView":1,"byteOffset":0,"min":[-0.0587991699576378,0.0129461474716663,-0.0740185976028442],"max":[0.0618169121444225,0.173104390501976,0.104356855154037]},{"componentType":5126,"type":"VEC3","count":477,"bufferView":2,"byteOffset":0},{"componentType":5126,"type":"VEC2","count":477,"bufferView":3,"byteOffset":0}],"images":[{"name":"DuckyMesh.fbm/Ducky.jpg","uri":"DuckyMesh.fbm/Ducky.jpg"}],"samplers":[{}],"textures":[{"name":"file4","sampler":0,"source":0}],"materials":[{"name":"lambert2","alphaMode":"OPAQUE","extras":{"fromFBX":{"shadingModel":"Lambert","isTruePBR":false}},"pbrMetallicRoughness":{"baseColorTexture":{"index":0,"texCoord":0},"baseColorFactor":[0.800000011920929,0.800000011920929,0.800000011920929,1],"metallicFactor":0.200000002980232,"roughnessFactor":0.800000011920929}}],"meshes":[{"name":"Ducky","primitives":[{"material":0,"mode":4,"attributes":{"NORMAL":2,"POSITION":1,"TEXCOORD_0":3},"indices":0}]}],"nodes":[{"name":"RootNode","translation":[0,0,0],"rotation":[0,0,0,1],"scale":[1,1,1],"children":[1]},{"name":"Ducky","translation":[0,0,0],"rotation":[0,0,0,1],"scale":[1,1,1],"mesh":0}]} |
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.
Whats this .meta file?
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 have no idea. It got generated when I exported the .gltf model. Are those not just part of the gltf? I can delete it.
}, | ||
{ | ||
"shape": "cylinder", | ||
"radiusTop": 0.02, |
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.
Weird that Cannon cylinders have both a top and bottom radius.. but I guess that lets you make some interesting shapes.
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.
Only way to get a cone
src/components/super-cursor.js
Outdated
return true; | ||
} | ||
|
||
if (el.parentNode && el.parentNode != el.sceneEl) { |
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.
Hmm, walking up the tree like this every frame is a bit concerning. Also I would inline this recursion. Shouldn't the raycaster be handling this filtering for you anyway?
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.
The issue is that the raycaster is set to check against .interactable
and .collideable
but only when hitting a .interactable
do I want to do run this logic. That might go away once the cursor draws on top of everything (.collideable
is only really used for that purpose), although a similar problem will reappear once we start using this cursor for the HUD.
scale="2 2 2" | ||
class="interactable" | ||
super-networked-interactable="counter: #counter; mass: 5;" | ||
body="type: dynamic; mass: 5; shape: box;" | ||
body="type: dynamic; shape: none; mass: 5;" |
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.
ooh lighter ducks 🦆
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.
nah the ducks still weigh 5lbs, they just have a more interesting shape now.
Duck interactables updated to use
shape
components.Most of the work to support this is in: n5ro/aframe-physics-system#90
Note: the interactables will be moved into dynamically loaded gltf bundles soon. Additionally, the environments will make use of
shape
components soon as well.