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

TransformControls: Fix arguments of intersectObjectWithRay(). #19177

Merged
merged 1 commit into from
Apr 21, 2020

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Apr 20, 2020

intersectObjectWithRay() was still called two times with an array as first parameter. But only in the js version of TransformControls. Seems something went out-of-sync.

@Mugen87 Mugen87 changed the title Examples: Clean up. TransformControls: Fix arguments of intersectObjectWithRay(). Apr 20, 2020
@Mugen87 Mugen87 added this to the r116 milestone Apr 20, 2020
@mrdoob mrdoob merged commit 5ee6e85 into mrdoob:dev Apr 21, 2020
@mrdoob
Copy link
Owner

mrdoob commented Apr 21, 2020

Thanks!

@mrdoob
Copy link
Owner

mrdoob commented Apr 25, 2020

I think this is the same, right?

function intersectObjectWithRay( object, raycaster, includeInvisible ) {

	var allIntersections = raycaster.intersectObject( object, true );

	for ( var i = allIntersections.length; i --; ) {

		if ( allIntersections[ i ].object.visible || includeInvisible ) {

			return allIntersections[ i ];

		}

	}

	return false;

}

@mrdoob
Copy link
Owner

mrdoob commented Apr 25, 2020

327b63a

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.

None yet

2 participants