Jump to content

Search the Community

Showing results for tags 'triangle'.

  • 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 2 results

  1. Hello I get some black parts on custom shapes created with BABYLON.MeshBuilder.ExtrudeShape Here is my code (this.points is an array of Vector2): if (!this._shapeInScene) { let points: Array<BABYLON.Vector3>; let path: Array<BABYLON.Vector3>; let color: BABYLON.Color4; // points = new Array<BABYLON.Vector3>(); for (let p of this.points) { points.push(new BABYLON.Vector3(p.x, p.y, this.plan.planCenter.y)); } points.push(points[0]); path = new Array<BABYLON.Vector3>(); path.push(new BABYLON.Vector3(0, 0, 0)); path.push(new BABYLON.Vector3(0, this.height, 0)); this._shapeInScene = BABYLON.MeshBuilder.ExtrudeShape( this.name, { shape: points, path: path, sideOrientation: BABYLON.Mesh.DOUBLESIDE, updatable: true, cap: BABYLON.Mesh.CAP_END } ); color = new BABYLON.Color4(this.color.r / 255, this.color.g / 255, this.color.b / 255, 1); this.colors = new Array<number>(); var positions = this._shapeInScene.getVerticesData(BABYLON.VertexBuffer.PositionKind); this.positions = []; for(var p = 0; p < positions.length; p++) { this.positions.push(positions[p]); } for(var p = 0; p < positions.length / 3; p++) { this.colors.push(color.r, color.g, color.b, color.a); } this._shapeInScene.hasVertexAlpha = true; this._shapeInScene.setVerticesData(BABYLON.VertexBuffer.ColorKind, this.colors); } And here a screenshot of my issue : And my question is what could be the reason of this issue? Maybe my points in my Vector2 Array are not sorted properly? Here an exemple on a babylon playground: https://www.babylonjs-playground.com/#HG7TAS
  2. So to render my game I have a imaginary triangle that gets all the objects in a 2d array in front of the player. So I can get all the objects that intersect the red triangle. But how do I get the ones inside the triangle?
×
×
  • Create New...