Jump to content

Search the Community

Showing results for tags 'select mesh'.

  • 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 1 result

  1. Hi! I'm trying to create unit (mesh) selection as it is in various strategy games(AoE, CnC (attached image) ...). After some exploring, I've came to the following, but there are a couple of steps I don't know how to do: 1. Hook to events (OK - trivial) 2. Draw lines using BABYLON.Mesh.CreateLines - at what position? Set LineMesh parent to camera? How to translate mouse position (scene.pointerX and Y) to world coordinates? Just draw rectangle and and set transformation matrix to identity (4x4)? Canvas 2d and 3d context can't be used together. 3. Once that is known, visible meshes are selected with octree (frustum plane is created and used for selection via octree.select method). But frustum plane can be very small and very close, or very big and far away (but this it's probably solved at step 2) I haven't really got to point 3. (got stuck at 2) so it's only my speculation. I'm open to suggestions if there are any better options . Explanation for attached image for non strategy game players: Green rectangle was drawn simply clicking in one corner and dragging. It's always orthogonal to camera view and at the same position (also based on camera) even if camera is moved or rotated. Its rendered above everything and every unit inside is selected. Thanks!
×
×
  • Create New...