Jump to content

Search the Community

Showing results for tags 'collider'.

  • 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
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

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 21 results

  1. Hi, I am working on my first 2D game with phaser 3. I have set up vscode with node https server and running it to deploy the game on localhost. While the game gets compiled successfully and deployed I get a run time error when executing the collider and overlap function. For the time being I have a title screen with "welcome to my game" text and it is clickable. One you click that you are navigating to play scene. When naigating to play scene I am getting the error displayed in the following scrren shot. I suspect that this is caused by 'this' keyword and the scope of it. But I have no id
  2. Hello everybody, I am new to Phaser and thought why not start with Phaser 3. My program dynamically changes the rotation of a box and I wanted the collider to rotate as well, but I didn't find how to archive this. var config = { type: Phaser.AUTO, width: 800, height: 600, //window.innerHeight; physics: { default: 'arcade', arcade: { gravity: { y: 300 }, debug: true } }, scene: { preload: preload, create: create, update: update } }; //... function create() { //... blockAU =
  3. I have a room with a wall, I want my player does not go through the wall, so I need a collider. The collider doesn't work with the commented code, but it works well with the uncommented one, which basically does the same thing in 2 separate commands. // ... function preload() { this.load.atlas('background', 'dist/sprites/background.png', 'dist/sprites/background_atlas.json'); this.load.spritesheet('zelda', 'dist/sprites/zelda_sprite.png', {frameWidth: 50, frameHeight: 50}); } let walls; let player; function create() { this.add.tileSprite(384, 288, 768, 576, 'background'
  4. Hi, This is my first post and I hope I can help and be helped in this forum. 😊 i am develop my first game in phaser 3. its a RPG. My question is: Its posible get random zone (X,Y) and check if is collider zone? I am creating the enemies with random spawn position. Thansk for all.
  5. A collider collides only with set tiles on a tilemap. However, if you are using an overlap with a tilemap, it always callbacks. If you log the index of the Tile, it's 0. So "no set tile". Is that intended behavior?
  6. Hey All, I hope you can help me. I'm quite new to Phaser. I've looked all over google and couldn't find an answer to my question. I have an idea for a Tetris-like game. At the moment I'm learning the basics by setting up a single block to fall on the floor before another single block falls after it. The block falls from the air onto the ground just fine. The issue is: I simply want to have a collision call back happen once. I've simplified the code to make the question easier to read: function create () { this.physics.add.collider(block, ground, hitFloor, null, this); }
  7. Hi All! I have a question. A Player who has collision. For each object I have to assign this.physics.add.collider(player, group); this.physics.add.collider(player, objectLayer); How to give collision globally ? Just give collider player and other object separately.
  8. Hello! I was wondering if this is the correct approach, regarding management of the collider when restarting a scene. I have added this collider in my scene: this.physics.add.collider( this.traps, this.player, this.playerTrap, null, this ); I restart the scene as soon as this collision happens in the playerTrap() function: private playerTrap(): void { this.player.setAlive(false); this.cleanScene(); this.scene.start("GameScene"); } The cleanScene(): private cleanScene(): void { this.physics.destroy(); } Without the cleanScene() funct
  9. Hi everyone, I'm trying to figure out how to 'reset/readjust' a sprites collider with the ground, because before set the collider bounds, I got this (first image) using the follow code: var game = new Phaser.Game(1024, 800, Phaser.AUTO, 'BreakOut Phaser',{preload: preload, create: create, update: update}); var bats; var leftKey; var rightKey; function preload() { this.load.image('background', '{% static 'assets/Background/background.png' %}'); this.load.image('ball', '{% static 'assets/Balls/ball_red_resize.png' %}');
  10. Hello, Today I started with Phaser, I worked a lot at school with when I had free time. But I have a problem I can't delete an item in my group when my character makes a collision an item belonging to the group. make my group: (in create function) game.physics.startSystem(Phaser.Physics.ARCADE); game.physics.enable(character, Phaser.Physics.ARCADE); game.physics.enable(enemygroup, Phaser.Physics.ARCADE); enemygroup = game.add.group(); for(var i=0; i<10 ;i++) { var s = enemygroup.create(game.world.randomX, game.world.randomY, 'monster');
  11. Hi friends, I'm new to babylon js. i want to add a slope the player want to jump from that. but i don't know how to add this.
  12. Hello, I've got this code: create: function () { this.cursor = game.input.keyboard.createCursorKeys(); this.jump = game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR); this.xKey = game.input.keyboard.addKey(Phaser.Keyboard.X); game.world.setBounds(0, 0, 1920, 0); //Fisicas game.physics.startSystem(Phaser.Physics.ARCADE); game.world.height = 1000; //fondo game.stage.backgroundColor = "#00FFFF"; //codigo de plataformas this.platforms = game.add.group();
  13. if we set box1.physicsImpostor do we still have to set box1.checkCollisions = true; or can we remove box1.checkCollisions = true; from code? why we need .checkCollisions = true? Is not box1.physicsImpostor enought to do in code? Why/When we must do .checkCollisions = true for colliders? How .checkCollisions = true actualy works in babylonjs engine ? greetings Ian
  14. Is is there any way to debug impostor of mesh. If we have BABYLON.PhysicsImpostor.BoxImpostor on some mesh, Can we debug bouning box of BoxImpostor or any other impostors, that we can see how Impostors looks like around mesh? greetings ian
  15. Is it possible to make mash collision physics calculation only around some radius around mesh? For example If we have ball with radius 1 unit and some big mesh with 1 milion vertices. I would like that mesh collision will calculate only collision around radius 5 unit around current ball position. Object with mesh-collision will be rotate at run-time (So if we don't have static-collider object_with_mesh_impostor/collider) Is possible to add this functions? Can be this funcions accelerate collision calculation? @RaananW @Deltakosh Greetings Ian
  16. Hi I have some problem with collider of child box. If we set parent box and add child box. If Child have its box collider, and if we rotate parent box, child is changing (potition and rotation), but child's box collider is not changing (position and rotation). How should we achive that box-collider will follow child when we (rotate or maybe change position of parent). Here is example of what I am talking about. (here is grid-box seen as box-collider of child-box. and grid-box is not changing position and rotation). http://www.babylonjs-playground.com/#MBFUI#9 (or mybe http://www.ba
  17. I am building a basketball game. I cannot get the ball to stop sticking to the rim colliders. When I was running p2 physics, the ball would simply bounce off the rim colliders as expected, but now, everytime the ball touches the rim colliders, it slows down movement rapidly and doesn't bounce or fall as expected. I think I might be missing a property setting somewhere. I set the rim colliders (leftMarker + rightMarker) to be immovable in create() but I'm not sure what else I need. I don't understand why the colliders stick to each other! Any help is appreciated! Basketball.Game = func
  18. Hi, Can you please tell me which type of impostors does Oimo.js with Babylon.js support?I use babylon.js and oimo.js I read this instructions herehttps://blogs.msdn.microsoft.com/davrous/2014/11/18/understanding-collisions-physics-by-building-a-cool-webgl-babylon-js-demo-with-oimo-js/ On this page is mention thatthere are 4 impostors:1. Box2. Sphere3. Capsule4. MeshWhich of this 4 impostors are supported in oimo.js ???Which js implement collision oimo.js or babylon.js ??? With Blender I did:I create some simple path and one ball.I set physic collisions and rigid.Path objec has Mesh - collision
  19. I am trying for object to object collision where cubes be dragged and stop when collided with another cube. surfed net for hours tried babylon.js documentations but no luck. you can see the problem online at this live link: http://websorce.com/babylon/2builtin_models.php The cube, torus, sphere can drag through each other, I need them to stop passing through each other. Here is the code I written var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); var createScene = function () { var scene = new BABYLON.Scene(engine); scene.cl
  20. Hi i made a character, Bob. How can i solve to Bob can hit the vase? scr+blend file <-- Link
  21. Hi guys, new to Phaser so maybe this isn't a bug. I searched on the forum but i cannot find any information about it, hope it will be not already asked. I found an issue regarding the circle body collider, in particular when scaling a sprite the circle collider doesn't fit the new scale of the sprite. You can try this out by modify the "Circle vs Polygon" example, just add this line of code: "sprite4.scale.setTo(0.7, 0.7);" after creating sprite4 in create() function. You can find an image attached. The fact is that if you remove the circle body (using the rect one) everything's f
×
×
  • Create New...