Search the Community
Showing results for tags 'intersects'.
-
Hello, I'm new to Babylon.js. I was wondering is there a way to trigger event when camera and mesh intersects? I tried put camera in to a box, and when these two meshes(camera container and object) met I want to trigger some events, but it's not working as I thought. camera mesh collisions event | Babylon.js Playground (babylonjs.com) Is there any other possible solution? Thanks!
-
- babylon
- babylon.js
-
(and 2 more)
Tagged with:
-
What exactly is the difference between the overlap and intersects functions, besides the fact that intersects can't use callback functions?
-
Hi, I'm developing a basic game. The functionality of the game is, once the page is loaded one objects will appear on the canvas like (apple, cat, dog etc...) on the left side and a bunch of letters will appear on the right side. The user will have to drag and drop the letters in a rect area(bucket). Once the user dragged matched letters with the object within bucket then next object will appear in the same area. I have created, but this is not working properly. http://dothejob.in/kids-game/phaser-demo2/ Could anyone help me on this? here is the js file. http://dothejob.in/kids-game/phaser-demo2/js/game.js I need to check the following things....How can detect if the letters are dropped in rect? and which letter is dropped in Rect? Thanks Alex
-
- phaser js
- intersects
-
(and 1 more)
Tagged with:
-
Hey guys, I am trying to place some boxes randomly on a heightmap. Easy, eh? Well, therefor I want to determine the current altitude at some random coordinates by casting a ray to see where it intersects with the ground mesh as suggested here: http://www.html5gamedevs.com/topic/2248-retrieve-heightmap-altitude/ That's what I got so far: http://www.babylonjs-playground.com/#HLQ0L#0 But it always returns a hit: false ... I feel like I am missing something here or just doing it wrong but I can't seem to figure out what. Any idea?
-
i am using this function to check if a body that jumped over a ramp (and therefore was set to sensor=true) has left the worldbounds and should be killed. this works for all edges of the world except for the left one.. i can manage to make it work by asking for if (body.x <0) {killit }but if i use the intersects method it will always return true even if x is much smaller than 0 if i console.log the game.world.bounds i get: b.Rectangle {x: 0, y: 0, width: 3200, height: 2560, offset: function…} so with the worldbounds it seems everything is ok.
-
- p2
- worldbounds
-
(and 1 more)
Tagged with:
-
Hi, I was wondering which one would be. I have set the game's viewport to 800x600 and the world bounds to 2048x1024. The player moves and the camera follows it. I want to dynamically load the tiles that are in the bounds of the viewport while the player moves around and kill the ones that are out. I was naively trying to kill() onOutOfBounds and then revive() onEnterBounds. Did not work but i don't know why. Apparently behind scenes is doing: !this.game.world.bounds.intersects(this._bounds)So i tried to replicate the functionality building an array of the killed tiles onOutOfBounds and, on the update() method, iterate over the killed tiles to check the intersect: if( game.world.bounds.intersects(killedTiles[i]._bounds) ){ killedTiles[i].revive();}The conditional is always false (?) and the ammount of process seems like an overkill for me (for big maps). Anyway i am using isometric phaser plugin if that makes any difference (i tried also with killedTiles._isoBounds). Someone has any tips?
- 1 reply
-
- isometric
- intersects
-
(and 2 more)
Tagged with:
-
Hello. Is it possible? I need to check if one cube touches a side (face) of another cube (it should be exactly its side/polygon, not just a single point). Off-topic: What's "isInFrustrum(frustumPlanes)"?
- 2 replies
-
- intersect
- intersects
-
(and 4 more)
Tagged with: