collision-detection

Javascript collision detection system don't ignore blocked collisions

不羁岁月 提交于 2019-12-20 01:08:55
问题 I'm having issues during a minigame development using EaselJS with my collision detection system and I need someone's help. The issue occurs when the hero (a circle bitmap) collides an object and there's other object behind the first one, the hero collides with both objects, even if the second collision is blocked. Here's an image explanation: The cause of the problem is really simple, even if the problem itself isn't: This collision detection system is based on the future position of the

Javascript collision detection system don't ignore blocked collisions

大憨熊 提交于 2019-12-20 01:08:17
问题 I'm having issues during a minigame development using EaselJS with my collision detection system and I need someone's help. The issue occurs when the hero (a circle bitmap) collides an object and there's other object behind the first one, the hero collides with both objects, even if the second collision is blocked. Here's an image explanation: The cause of the problem is really simple, even if the problem itself isn't: This collision detection system is based on the future position of the

Javascript ball collision

落爺英雄遲暮 提交于 2019-12-19 11:57:30
问题 I am trying to create a simple javascript game with simple physics. I can determine when 2 balls are colliding but I have having problems with handling the collision. Does anyone know of any useful tutorials on this? I've been searching the internet for a couple days but can't seem to find anything. 回答1: In the UK, this would be A-level maths, so not too advanced. I think the phrase you need is "elastic collision". That page has some of the formulae you need. 回答2: Physics for JavaScript Games

Algorithm for checking if 3D point inside convex polyhedron (square pyramid)

泄露秘密 提交于 2019-12-19 11:56:11
问题 I am looking robust collision detection algorithms and found an awesome book called Realtime Collision Detection by Christer Ericson. I am trying to use a particular algorithm which checks whether a given point is inside convex polyhedron (in 3D space these are the square pyramid, cube and tetrahedron (aka pyramid with all sides being a triangle)). In my case I have a square pyramid. The validation of the point is done by using the intersection volume for a given number of halfspaces and

Algorithm for checking if 3D point inside convex polyhedron (square pyramid)

送分小仙女□ 提交于 2019-12-19 11:55:57
问题 I am looking robust collision detection algorithms and found an awesome book called Realtime Collision Detection by Christer Ericson. I am trying to use a particular algorithm which checks whether a given point is inside convex polyhedron (in 3D space these are the square pyramid, cube and tetrahedron (aka pyramid with all sides being a triangle)). In my case I have a square pyramid. The validation of the point is done by using the intersection volume for a given number of halfspaces and

Collision Detection of Sprites in Actionscript 3.0 Flash

回眸只為那壹抹淺笑 提交于 2019-12-19 11:29:50
问题 I am making an achtung die kurve-like game in AS3.0. So far I've done the movements of the 4 different players, and it works alright. I am now to make collision detection, in order to test if a 'worm'-so to speak, is colliding with eachother or its own tail. As I understand it, if I use hitTestObject(); it will use the registration area of the whole object, which would be a huge problem, seeing since this registration makes a 4-sided registration that contains all of the object. So if this is

Swift Spritekit I detect a collison but it reads the collision mulitple times

眉间皱痕 提交于 2019-12-19 09:29:13
问题 AppImage I have a wall of 4 rectangles that are different colors, to pass through the wall the color of the ball has to match that of the rectangle on the wall. The ball will pass through the wall, and a new wall will appear. However, when I detect this collision I get multiple collision readings. I have tested this by printing dead or alive, and it prints both or more many times. func didBegin(_ contact: SKPhysicsContact) { if let nodeA = contact.bodyA.node as? SKShapeNode, let nodeB =

Swift Spritekit I detect a collison but it reads the collision mulitple times

*爱你&永不变心* 提交于 2019-12-19 09:29:03
问题 AppImage I have a wall of 4 rectangles that are different colors, to pass through the wall the color of the ball has to match that of the rectangle on the wall. The ball will pass through the wall, and a new wall will appear. However, when I detect this collision I get multiple collision readings. I have tested this by printing dead or alive, and it prints both or more many times. func didBegin(_ contact: SKPhysicsContact) { if let nodeA = contact.bodyA.node as? SKShapeNode, let nodeB =

Three.js - Accurate ray casting for collision detection

牧云@^-^@ 提交于 2019-12-19 08:58:26
问题 I'm working with Three.js, version 68 . I'm using the same method for collision detection as this guy is using here, which is great most of the time (A big "thank you" goes out to the author!): http://stemkoski.github.io/Three.js/Collision-Detection.html Here is a link to the source if you want to download it from github. Just look for Collision-Detection.html : https://github.com/stemkoski/stemkoski.github.com Here is the code that is important to the collision detection: var MovingCube; var

2D Platformer Collision Problems With Both Axes

允我心安 提交于 2019-12-19 07:49:27
问题 I'm working on a little 2D platformer/fighting game with C++ and SDL, and I'm having quite a bit of trouble with the collision detection. The levels are made up of an array of tiles, and I use a for loop to go through each one (I know it may not be the best way to do it, and I may need help with that too). For each side of the character, I move it one pixel in that direction and check for a collision (I also check to see if the character is moving in that direction). If there is a collision,