Jump to content

Search the Community

Showing results for tags 'PickingInfo'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 4 results

  1. Hi, I would like to pick a mesh and moving it around a room which is a simple cube with backside orientation. Basically, it consists on 3 functions called on 3 distinct events onPointerDown : I select the mesh I want to move (main mesh) when I click on the mouse onPointerMove : I select a different mesh in order to move the main mesh when I drag the mouse onPointerUp : I deselect the main mesh when I release the click of the mouse The behavior I want to produce is to dragndrop the main mesh on visible faces only and keeping each face belonging to the same mesh (I don't want to create as many meshes as faces). For instance, when my camera is above the room, the ceiling is transparent and we can see the floor due to the backside orientation of the room. But on step 2, I can't figure out how to pick the face which corresponds to the floor. I only succeed to pick the ceiling. I tried to build a predicate (pickInfo = scene.pick(x,y,predicate)) based on faces normales but once a mesh has been evicted from the predicate, it is not recalled, even if more than one face which is intersected. So I would like to know if there is a way to do what I'm expecting to do. When a mesh has succeed the predicate, how the returned pickInfo is built ? The selected face (pickInfo.pickedPoint) is always the nearest from the camera ? Is is possible the return an array of valid meshes with an another array containing its corresponding faces intersected ? Here is a PG relating my issue : http://www.babylonjs-playground.com/#1V3CAT#185 Thanks
  2. Hello, I would like with my 'dbclick' event function recover pickingInfo like the function onPointerDown. How can do I ? I would like recover the mesh informations. http://www.babylonjs-playground.com/#7JOOL I saw that there was another way to place an event on a mesh. More suitable for my case I think. My problem with this method is that I can not access variables in my class... this._machine.actionManager = new BABYLON.ActionManager(scene); this._machine.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickUpTrigger, function () { alert("machine cliqued"); alert("this._privateAttribut"); //undifined }));
  3. Hi there, I'm literally brand new to WebGL and BabylonJS ( although already a programmer and 3d artist ), but having a lot of fun learning it, great job on the engine/api so far guys. What i'm trying to figure out, is if there is a way to discover the rgb texture value where the mouse has been clicked.. Having a look at PickingInfo, it looks as though getTextureCoordinates() might be used to read the position on a bitmap texture for example ( just wild theories at this point of course ), although i can see no way to access the rgb data of a bitmap or texture object anywhere in the Babylon API. Any idea if this might be possible? Basically what i'm trying to achieve is - i have an object, with a texture on it, and i would like the user to be able to click on different parts of the object to make stuff happen. So i was thinking, if the texture had say a blue area, the user clicks on the blue, it does something, they click on a red part, it does something else.. The other more obvious way i think to achieve this would be to either break the object up into separate clickable meshes and go from there, or have invisible hotspot meshes that detected clicks in specific areas.. But i just wanted to try and figure out if this would be possible. Texture hotspots based on colour would be a handy thing to have for general interactivity..
  4. Got some error with intersects. Doc says it return PickingInfo with pickedPoint :BABYLON.Vector2 Must be v3?
×
×
  • Create New...