
tmuecksch
Members-
Content Count
17 -
Joined
-
Last visited
About tmuecksch
-
Rank
Member
Profile Information
-
Gender
Male
-
Location
Germany
-
I'd love OBB collision detection
-
Thank you very much. Yes my question was about the minimum distance between a point and a line segment (I didn't know the english term).
-
Hey there, I'd like to determine the distance between a point and a line. The line is denoted by two pairs of x,y coordinates. Is there a phaser-way of doing this? Thanks in advance!
-
[WIP][Three.js] Stellar-Conflicts Multiplayer 2D/3D
tmuecksch replied to kyled's topic in Game Showcase
I like the game, but I think the UI should be more intuitive.- 4 replies
-
- 3d
- multiplayer
-
(and 3 more)
Tagged with:
-
As far as I can tell the performance is similar to the Arcade physics. Collision is detected perfectly fine, but the off bouncing doesn't work properly at the moment. I'm working on that currently
-
-
I need some help. Does anyone know how to calculate bouncing between two collided OBB objects?
-
I'm currently working an a work-around to add OBB collision detection to Phaser's Arcade Physics since Phaser lacks of that. Maybe you want to contribute to that. I guess many people around here need it. You can find the github repo here if you want to help: https://github.com/tobiasmuecksch/OBB-for-Phaser
-
I started a github project for adding OBB to Phaser. I took the gist by enriqueto and made a little work-around that is available here: https://github.com/tobiasmuecksch/OBB-for-Phaser But be aware that it doesn't work as expected yet. Maybe some of you want to contribute
-
Okay guys. I got me some literature on how to detect collision and will try to create some fix. As soon as I have a solution I will check back with you here.
-
-
-
I'm a little confused. I can't find any explanation why Ninja was dropped in the topic you linked to. Instead as far as I understand it, it introduces Ninja Physics (keep in mind that this topic is over a year old). I've read in some other posts that Ninja is believed to support rotating bounding boxes, but I guess thats superstition, since I couldn't find any evidence in the docs (and in it's code).
-
Cool graphics by the way
-
Hm. Okay. I'm thinking about forking the Arcade physics engine and trying to make this myself. I thought maybe there already is a solution for that.
-
Hey there, I wonder if there is any physics engine for Phaser 2.3.0 that works like the arcade physics but enhances it by OBB (oriented bounding box) collision detection? I'd like to avoid P2 or Box2d for the sake of performance, since OBB would perfect satisfy my needs. Thanks in advance! UPDATE I started a github project for adding OBB to Phaser. I took the gist by enriqueto and made a little work-around that is available here: https://github.com/t.../OBB-for-Phaser But be aware that it doesn't work as expected yet. Maybe some of you want to contribute
-
I don't fully understand your problem. But I guess you have implemented the getting started guide of phaser.io (which has gravity pulling the player down to the bottom of the screen until it hits the ground) and want to start implementing your game form this point. In this case you simply can implement it this way: update: function () { if (cursors.left.isDown) { player.angle -= 4; } else if (cursors.right.isDown) { player.angle += 4; } if (cursors.up.isDown) { // The speed we'll travel at currentSpeed = 300; } else { if (currentSpeed > 0) { currentSpeed -= 4; } } if (currentSpeed > 0) { game.physics.arcade.velocityFromRotation(player.rotation, currentSpeed, player.body.velocity); }}You should initialize the currentSpeed variable at the top of your game.js var currentSpeed = 0;Does this help you? P.S.: I'm often "stealing" code snippets from the Tanks example on phaser.io. In fact the code snippet above is taken from this example.
- 4 replies
-
- physics
- physics engine
-
(and 1 more)
Tagged with:
-
For those who will have the same problem in the future: I found a very simple way to achieve this behavior: var angle = player.body.data.angle + Math.PI / 2;player.body.data.velocity[0] = currentSpeed * Math.cos(angle);player.body.data.velocity[1] = currentSpeed * Math.sin(angle);The problem is: This disables many features P2 would have given you, for example the player bouncing off walls and such. If anyone has an Idea how to do get rid of the drifting "the p2 way", I would be very grateful!