Forum Replies Created
-
AuthorPosts
-
Alexander Kovelenov
StaffHi,
you might use something like that:
the code in puzzle:
const objHeight = 1.5; const height = objHeight / 2 * app.camera.zoom * app.getHeight(); console.log(height);
-
This reply was modified 1 week, 1 day ago by
Alexander Kovelenov.
-
This reply was modified 1 week, 1 day ago by
Alexander Kovelenov.
Alexander Kovelenov
StaffAlexander Kovelenov
StaffAlexander Kovelenov
Staff2025-03-19 at 4:00 pm in reply to: Potential feature request – set morph for all objects in list #80744Alexander Kovelenov
Staff2025-03-14 at 11:54 am in reply to: Issue with Black Model Display in secondaryRenderer When Creating Multiple Views #80615Alexander Kovelenov
StaffAlexander Kovelenov
StaffHi,
unfortunately for touch controls you have to completely override the OrbitControls class which requires some knowledge of JavaScript.-
This reply was modified 4 weeks, 1 day ago by
Alexander Kovelenov.
Alexander Kovelenov
StaffAlexander Kovelenov
StaffAlexander Kovelenov
StaffIf that’s something which could be roughly build with puzzles, the type of navigation used in the VR Demo would greatly benefit from this.
Hi Thomas,
Here is how we do it. You can use this snippet as a basis for your own puzzle or with “exec script”:_handleCollisions() { if (!this._enableCollisions || this.collisionMeshes.length == 0) return; this._raycaster.ray.origin.copy(this.object.position); this._raycaster.far = this.storyHeight; const intersections = this._raycaster.intersectObjects(this.collisionMeshes, false); if (intersections.length > 0) { const intersection = intersections[0]; this.object.position.y = intersection.point.y + this.gazeLevel; this._onCollisionMesh = true; } else if (this._onCollisionMesh) { let minDistance = Infinity; for (const mesh of this.collisionMeshes) { if (!mesh.geometry.boundsTree) { console.warn('v3d.FirstPersonControls: no bounding tree found on ' + mesh.name); continue; } this._toMeshSpaceMatrix.copy(mesh.matrixWorld).invert(); this._lastIntersection.copy(this.object.position); this._lastIntersection.y -= this.gazeLevel; this._lastIntersection.applyMatrix4(this._toMeshSpaceMatrix); const target = this._ppTarget; mesh.geometry.boundsTree.closestPointToPoint(this._lastIntersection, target); if (target.distance < minDistance) { this._nearestPoint.copy(target.point); this._nearestPoint.applyMatrix4(mesh.matrixWorld); minDistance = target.distance; } } if (isFinite(minDistance)) { this.object.position.copy(this._nearestPoint); this.object.position.y += this.gazeLevel; } else { // NOTE: fallback if no bounding trees present on collision meshes this.object.position.copy(this._lastPosition); } } }
This new code is from Verge3D preview that uses closestPointToPoint() method to push the camera back to the collision map. You’ll need to modify it to handle the “camera control object” instead.
-
This reply was modified 1 month, 2 weeks ago by
Alexander Kovelenov.
Alexander Kovelenov
StaffHi,
the “open web page – replace url” puzzle does not operate on the URL of the parent page (so it could not be used inside iframed apps). One possible workaround is to use the “exec script” as follows:
-
This reply was modified 2 months ago by
Alexander Kovelenov.
2025-01-10 at 6:34 am in reply to: Implement button clicks in the built-in WordPress editor – Verge3D Plugin #79758Alexander Kovelenov
StaffAlexander Kovelenov
StaffAlexander Kovelenov
StaffI see no critical errors in the console you provided. I believe there is a logical issue in the puzzles scenario itself. There are some hints that might help in debugging it:
1. Use more print to console to find our the possible reason of this misbehavior.
2. Temporary disable blocks that are not relevant to this particular functionality. This will help you in narrowing it down.
2025-01-09 at 5:57 am in reply to: Implement button clicks in the built-in WordPress editor – Verge3D Plugin #79721Alexander Kovelenov
StaffYou might try using the Chrome Developer Tools to find that element and get it by its class… etc manually, by executing the
document.querySelector(" ... ")
right in the browser console.Regarding the upload fail, apparently there is one file that has invalid MIME type (extension). You might need to review your app folder to find it and add its MIME to the plugin settings.
-
This reply was modified 1 week, 1 day ago by
-
AuthorPosts