Jump to content

  • Log In with Google      Sign In   
  • Create Account


mental.breakdance

Member Since 20 Mar 2012
Offline Last Active Sep 26 2012 04:46 PM
-----

Posts I've Made

In Topic: 2D tile-based collision engine - ideas for improvement?

24 September 2012 - 07:27 PM

Cool thanks! I'll post my second attempt when done - could be a while, as I'm working on loads of other things in the meantime. At the moment it works 'well enough' Posted Image

In Topic: 2D tile-based collision engine - ideas for improvement?

21 September 2012 - 11:49 PM

This is almost unreadable.

Personally I would just do a callback querry for every ingame object. The callback would check for collisions; each collision would map to a different state and/or manipulate a set of data within the object.


Ok so what you're saying is that the resultant movement should be handled by the game objects themselves and the collision engine should just stick to what its name implies - telling the game object whether it is colliding, what it is colliding with, and any related details that may be of use.. is that right?

In Topic: 2D tile-based collision engine - ideas for improvement?

21 September 2012 - 10:36 PM

wow.. MASSIVE tabs there. Oh well, near enough Posted Image

In Topic: standing cross section verts on an arbitrary surface

20 March 2012 - 05:13 PM

never mind.. sussed it. Was using Quaternions when I blatantly didn't need to. Ignoring the origin of the cross section (will add back in next) the following works:


Vector3 cross = Vector3.Cross( surfaceNormal, directionAlongSurface );

for( int i = 0; i < numCrossSectionVerts; ++i )
{
	 vertices[currentVertIdx++] = ( ( crossSectionVerts[i].x ) * cross ) + ( crossSectionVerts[i].y * surfaceNormal ) + points[0];
}

phew that was a lot easier than I made it out to be =/

PARTNERS