Tagged Questions
4
votes
2answers
78 views
Get collision details from Rectangle.Intersects()
I have a Breakout game in which, at some point, I detect the collision between the ball and the paddle with something like this:
// Ball class
rectangle.Intersects(paddle.Rectangle);
Is there any ...
0
votes
1answer
59 views
Can't detect collision properly using Rectangle.Intersects()
I'm using a single sprite sheet image as the main texture for my breakout game. The image is this:
My code is a little confusing, since I'm creating two elements from the same Texture using a ...
0
votes
2answers
139 views
map data structure in pacman
i am trying to make a pacman game in c# using GDI+, i have done some basic work and i have previously replicated games like copter-it and minesweeper. but i am confused about how do i implement the ...
1
vote
1answer
38 views
this.BoundingBox.Intersects(Wall[0].BoundingBox) not working properly
I seem to be having this problem a lot, I'm still learning XNA / C# and well, trying to make a classic paddle and ball game. The problem I run into (and after debugging have no answer) is that ...
-2
votes
1answer
142 views
C# XNA 2D Multiple boxes collision detection and movement
Hi,
I've been making simple game where you shoot boxes that are coming towards you.
All game objects are simple rectangles.
Now I have problem with collision detection; how to check where the ...
0
votes
1answer
164 views
How to collide with a 45degree wall in XNA
I want to make a PAC MAN imitation game to start working on AI, and while my first version will feature rectangles with widths or heights of 1 to makes walls for collision detection, I want to ...
2
votes
3answers
251 views
How to design 2D collision callback methods?
In a 2D game where you have a lot of possible combination of collision between objects, such as:
object A vs object B => object B vs A;
object A vs object C => object C vs A;
object A vs object D ...
1
vote
1answer
113 views
How would I be able to get a game over screen using the pause function?
I am having problems with my snake game, when the snake collides with itself it draws a "game over" image in the background, but only while it's colliding with itself. I want it to behave like the ...
1
vote
2answers
293 views
XNA How to detect collision between 2d sprites and 3d primitives (not models)
My current status:
I have already read some tutorials about 3d collision
I know how ray trace works and how to convert mouse follow a vector to track the closest object that collides with out vector
...
1
vote
1answer
125 views
How can I resolve collisions at different speeds, depending on the direction?
I have, for all intents and purposes, a Triangle class that objects in my scene can collide with (In actuality, the right side of a parallelogram).
My collision detection and resolution code works ...
0
votes
1answer
140 views
JigLibX collision detection only once
I try to implement collision detection in latest JiglibX using this example http://jiglibx.wikidot.com/catch-collisionevents . I choose creating callback. I try to detect collision only once. When ...
1
vote
2answers
1k views
How to determine collision direction between two rectangles?
I am trying to figure out how to determine the direction a collision occurs between two rectangles.
One rectangle does not move. The other rectangle has a velocity in any direction. When a collision ...
2
votes
1answer
439 views
Platformer Starter Kit - Collision Issues
I'm having trouble with my game that is based off the XNA Platformer starter kit.
My game uses smaller tiles (16x16) then the original (32x40) which I'm thinking may be having an effect on collision ...
1
vote
3answers
327 views
Collision Detection Problems
So I'm making a 2D tile based game but I can't quite get the collisions working properly. I've taken the code from the Platformer Sample and implemented it into my game as seen below.
One problem I'm ...
2
votes
2answers
268 views
Tile map collision is not working properly
I am having problems setting collision between my sprite and the tiles.
I have only done the code for colision for moving upwards but some places on the map it moves up and some places it doesn't.
...
1
vote
1answer
356 views
3D Collision help
I'm having difficulties with my project. I'm quite new in XNA. Anyway, I'm trying to make 3D game and I'm already stuck on one basic thing. I have terrain made from a heightmap, and an avatar model. I ...
-1
votes
2answers
365 views
How to calculate the direction a ball must bounce
I have a tile engine I have made. I can detect collision between the ball(the player) and the tiles. When a collision is detected all the colliding tiles are stored inside a list. My question now is, ...
1
vote
1answer
343 views
C# OpenTK - Getting world coordinates of points that are altered by matrices
I have written a skeletal animation system for a game i am working on. To draw lines that represent a skeleton, i use the GL matrix, and multiply it by each bone a long the body. For example before ...
5
votes
2answers
843 views
Isometric Collision Detection
I am having some issues with trying to detect collision of two isometric tile.
I have tried plotting the lines between each point on the tile and then checking for line intercepts however that didn't ...
1
vote
1answer
236 views
How to handle circle penetration
I've been working on cirlce to circle collision and have gotten the intersection method working correctly, but I'm having problems using the returned values to actually seperate the circles from one ...
3
votes
2answers
498 views
AABB > AABB collision response?
I'm really confused about how to fix this in 3d? I want it so that I can slide along cubes but without getting caught if there's 2 adjacent cubes. I've gotten it so that I can do x collision, with ...
1
vote
1answer
487 views
Circle to Circle collision, checking each circle against all others
I'm currently coding a little circle to circle collision demo but I've got a little stuck. I think I currently have the code to detect collision but I'm not sure how to loop through my list of circles ...
0
votes
2answers
1k views
Breakout collision using 2D Rectangles?
Here is my code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
namespace BreakOut
{
class Field
{
public static ...
6
votes
5answers
556 views
Need some advice regarding collision detection with the sprite changing its width and height
So I'm messing around with collision detection in my tile-based game and everything works fine and dandy using this method. However, now I am trying to implement sprite sheets so my character can have ...
3
votes
1answer
406 views
Character jittering with this tile based collision code
I have been trying to get my collision code working for hours now but with every resource I have tried my character still jitters. First I tried using the platformer sample but my character still ...
4
votes
2answers
1k views
Collision Detection, player correction
I am having some problems with collision detection, I have 2 types of objects excluding the player. Tiles and what I call MapObjects. The tiles are all 16x16, where the MapObjects can be any size, but ...
1
vote
1answer
287 views
Collision detection not working
I realized I put this in the wrong forum, so here it is:
I made a collision detection in the Update() section, and this is the code:
if (player.playerRect.Intersects(turtleRect))
{
...
6
votes
1answer
2k views
Microsoft XNA Platformer Example, is the Collsion Detection implemented accurately?
The example provided by Microsoft seems as if the collision detection (from what I can see) will have a small error. When the user collides with an Unpassable tile, the depth of the intersection is ...
1
vote
0answers
115 views
Farseer Physics EndContact events don't fire for all registered delegates
Here's my situation:
I have several objects that contain a body and a fixture. They are set to sensor = true;
atmosphere = BodyFactory.CreateCircle(world, atmosphereRadius / Level.METER_IN_PIXELS, ...
4
votes
2answers
354 views
Trace with 2D terrain
I currently have some 2D terrain in my game defined by 2D coordinates with lines drawn in between them (linear interpolation too keep it simple).
Now I want to cast a ray from anywhere above the ...