aframevr / aframe

:a: Web framework for building virtual reality experiences.
https://aframe.io/
MIT License
16.69k stars 3.98k forks source link

Consider adding rotation to tracked-controls demo #2285

Open donmccurdy opened 7 years ago

donmccurdy commented 7 years ago

The grab component currently only handles position. Rotation would be a nice addition here, and solves some common use cases without requiring users to drop in CannonJS.

Another, somewhat related, idea would be a snapped-grab component that does the same thing but snaps object position to some interval and rotation to 45º or 90º after the object is released.

ngokevin commented 7 years ago

Maybe we could just use the super-hands component

donmccurdy commented 7 years ago

That'd work too. I think the 'stretch' and 'drag-and-drop' functions are a bit less universal but otherwise it looks good.

dmarcos commented 7 years ago

Adding rotation means also switching from aabb collider to something else. The demo is not the ultimate tutorial of VR object manipulation. I wanted to keep the complexity to a minimum while still being compelling so it can be used as a base for more advanced stuff. I would not use third party components for the core examples.

machenmusik commented 7 years ago

maybe related links to registry demos then

donmccurdy commented 7 years ago

@dmarcos Just switching to sphere-collider would do the trick, right? Aside from the nuisance of figuring out relative rotations for nested objects..

Goal for filing this issue — it'd be great if there were minimal-as-possible component(s) for positioning and rotating objects with tracked controllers. If that can be done simply enough, we should include it in core. I don't think super-hands, or physics-based grabbing, is minimal enough to include in core.

Linking to registry demos would be orthogonal IMO, I'm not worried about discoverability of these components (they're already very visible, registry will make them more so) but just that there is no bare-minimum component yet (physics is overkill in most cases, and super-hands does more than most users need).