Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/examples/en/controls/DragControls.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ <h3>[property:Boolean enabled]</h3>
Whether or not the controls are enabled.
</p>

<h3>[property:Boolean recursive]</h3>
<p>
Whether children of draggable objects can be dragged independently from their parent. Default is `true`.
</p>

<h3>[property:Boolean transformGroup]</h3>
<p>
This option only works if the [page:DragControls.objects] array contains a single draggable group object.
Expand Down
5 changes: 3 additions & 2 deletions examples/jsm/controls/DragControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class DragControls extends EventDispatcher {
_intersections.length = 0;

_raycaster.setFromCamera( _pointer, _camera );
_raycaster.intersectObjects( _objects, true, _intersections );
_raycaster.intersectObjects( _objects, scope.recursive, _intersections );

if ( _intersections.length > 0 ) {

Expand Down Expand Up @@ -151,7 +151,7 @@ class DragControls extends EventDispatcher {
_intersections.length = 0;

_raycaster.setFromCamera( _pointer, _camera );
_raycaster.intersectObjects( _objects, true, _intersections );
_raycaster.intersectObjects( _objects, scope.recursive, _intersections );

if ( _intersections.length > 0 ) {

Expand Down Expand Up @@ -205,6 +205,7 @@ class DragControls extends EventDispatcher {
// API

this.enabled = true;
this.recursive = true;
this.transformGroup = false;

this.activate = activate;
Expand Down