3d Colision Detection in java format

Hi.

Im creating a very simple Java 3D engine (wireframe only, and not using the Java3D API);

I can now Do Camera Rotations And Translations around objects and everything seems to be Just Beautiful.
So Now,
How would I go about colision detection using :
X,Y, and Z (Rotation Angles, and Translation steps);

Remember,
I Am Looking For Something Completely Simple
That way I Might Be Able To Understand Whats Going On Instead Of Just Using An Algorythm.

Thank You Sincerely !
*GrimChild*

Comments

  • when you check for a collision, usually you are moving an object.

    If you wanted to check if the centre of an object will go through a polygon:
    1. create ray between the 2 points(past and future centre of object).
    2. calculate the intersection point of that ray and the polygon.
    3. Check to see if that intersection lays between the 2 centre points of the object. If yes, abviously a collision will happen in the move so the object shouldn't be allowed to move there.

    4. You might want to do this check with several polygons that the object might be colliding with.


    : Hi.
    :
    : Im creating a very simple Java 3D engine (wireframe only, and not using the Java3D API);
    :
    : I can now Do Camera Rotations And Translations around objects and everything seems to be Just Beautiful.
    : So Now,
    : How would I go about colision detection using :
    : X,Y, and Z (Rotation Angles, and Translation steps);
    :
    : Remember,
    : I Am Looking For Something Completely Simple
    : That way I Might Be Able To Understand Whats Going On Instead Of Just Using An Algorythm.
    :
    : Thank You Sincerely !
    : *GrimChild*
    :

  • Polygon intersection sounds good.
    I Just remembered that Java™ has a built in method for polygons ( .inside() ), returns a boolean value indicating ( in 2d ) whether my point lies within the area of my polygon..
    Thanks..
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories