Sensing an objects(Quads/Triangle) Positioning

I am creating a 3D game in Java using Lwjgl and i wanted to know if so, how can sense if a Quad/Triangle is in front of you or beside you. I would like to know this because i need to make the person stop moving forward when there is an object in front of them. Please help!?!?!?!?!?

You don’t. You’re thinking way too much from a visual perspective, and not enough of a game development perspective.

You see a polygon near another polygon. That’s not how your game should be thinking. It should be thinking in terms of the location of entities. Where are your game objects? Not the meshes, but the things that drive the meshes.

Collision between objects in a game is not governed by what you see. It is not covered by what gets drawn (and OpenGL only deals with drawing). It is governed by your collision detection system.

So your saying i have to make an aray of all the object positions and call it every time i move.

No, I’m saying that you should already have an array of all object positions. How else would you know where anything is?

A game is not merely a rendering application. You need to keep your game state separate from your rendering state.

lol ummm yeah sure i do! XD dont worry i was gonna do that anyway thanks for the help cause i would of spent like mounths trying to find that out.