Jump to content

  • Log In with Google      Sign In   
  • Create Account


mwkenna

Member Since 21 Jun 2006
Offline Last Active Nov 07 2013 09:30 AM
-----

Topics I've Started

Collision Response

06 November 2013 - 05:26 AM

I have implemented sliding collision response. Using a recursive collision response I am seeing some strange behavior and I believe it's because I am moving the player to the point of contact and then sliding them along the edge.

 

Question: I have seen a-lot of tutorials that say to move "very close to point of contact". Moving exactly to the point of contact before calculating the slide vector means that t=0 collisions are being registered and causing unnecessary recursion. Could someone provide some pseudocode to detail the correct process for recursive correction?

 

 

Thanks,

Mark.


Basic Swept SAT Collision Response

29 October 2013 - 01:56 PM

All

 

I am trying to understand swept sat following the Olli's tutorials. I have implemented the collision detection and understand all that code very well. What I am not sure on is how to handle the response. From his tutorials I can see that he implements "Basic arcade collision response" but I do not want to implement rigid body dynamics yet.

 

I have tried to modify the example code to remove all but the simplest collision resolution where we modify the players position based on MTD or time of impact but I'm getting some strange results.

 

Does anyone have a tutorial on how to correctly handle the response for t<0, t==0 and t>0 ?

 

Would really appreciate any help!

 

Thanks,

Mark.


2D Multiple Collision Response SAT

25 October 2013 - 03:45 AM

Hi All

 

I'm learning GameDev by developing a tile-based game.

 

I've implemented swept SAT using the great PolyColly tutorials. My "future-collision" response code is working very well but the "current-collision" response code is having trouble when resolving multiple collisions (like on an inside edge). Note that I am disregarding edges that are marked as "empty" as suggested by the great MetaNet tutorials. 

 

I've included 2 screenshots of the problem.

I can provide code on request.

 

I would really like to understand what is happening here.

 

Thanks,

Mark.


SAT Collision Response Finding Edge

24 October 2013 - 07:28 AM

Hi All

 

I am trying to follow the Metanet tutorial which shows a great method of disregarding the "inside edges" of a bunch of tiles so as to eliminate unwanted collisions.

 

Please forgive me, but,.. What is the best method for determining the edge that we are colliding with? Currently I am using the MTD to reverse-lookup the edge we are projecting out of but that seems wrong and likely to break under certain circumstances. 

 

If anyone has a better solution I would love to hear it.

 

Thanks,

Mark.


XNA Content Processor Transparency

05 October 2013 - 02:09 PM

Hi All

 

I am having a strange issue with a custom content processor for processing map levels.

 

I have the following code which imports a PNG image. When I use the serialized data in the spriteBatch.Draw(..) call, the renderer does not see magenta as transparent and the magenta color is left on the screen:

var extRef = new ExternalReference<Texture2DContent>(path);
var texture = context.BuildAsset<Texture2DContent, Texture2DContent>(extRef, null, data, null, asset);

If I modify the code to use a TextureContent type along with the required importer and processor types, along with some casting on the game-code-side the transparency is fine and there is no magenta shown:

var extRef = new ExternalReference<TextureContent>(path);
var texture = context.BuildAsset<TextureContent, TextureContent>(extRef, "TextureProcessor", data, "TextureImporter", asset);

Could someone please shed some light on what is going on here?

 

Thanks,

Mark.

 

 


PARTNERS