Hey, I want to add physics and collision detection in my game. At the moment I'm on the subject 'Collision detection' and I need some suggestions. I use XNACollision.cpp/.h from the Direct3D SDK for intersection tests. I need some help, how should I do to test collision between two AABBs and two spheres? I mean should I transform AABB/Sphere to World Space (but that result's into a fatter box) or should I do collision detection in local space of a object? (there are two boxes of two different models, both have their own local space. Should I transform box0 into local space of box1 and do collision detection there? or should I transform box1 into local space of box0 to do collision detection there?). Should I use physics engine for collision? if yes, then which one and what are the basics for becoming familiar with that physics engine?
The last question I put is 'How to walk around environment'? All games have buildings, houses, terrain etc. How they manage to get height of all those objects/environment to walk on it? Should I do ray-casting? (I already have a getHeight(x,z) function in my terrain class but what should I do if a house is on the terrain and I want my player to walk on the stairs and then go to terrace?)
Edited by newtechnology, 14 April 2014 - 02:34 AM.