• Advertisement
Sign in to follow this  

after collision( how to calculate my next move)

This topic is 4853 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

im having a terrible time dealing with what to do after collisions. heres the current suituation. i have a bounding sphere around my charachter. i have an AABB around each wall. i am using this line to move my charachter along the x axis :
device.Transform.World = Matrix.Translation(transV);
transV is a vector, the x value of which is simple incremented each frame.this line is in thte Draw() method of my charachter class.i have a strong feeling that translating the world matrix by a vector is very wrong but im not sure what else to do. now, i can detect when a collision has occoured, but how to do anything after this is causing great problems. to begin with i would like to make the charachter simply turn until it is not colliding with the wall, and then go ahead in a straight line until it hits another wall, and do the same. when i hit the wall, i have the center of my bounding sphere, the maxPoints and minPoints of the bounding box.how do i work with theese to allow my charachter to turn when colided with and continue moving when no longer coliding? what im really asking, is how do i create a vector or a matrix that changes the direction after a collision? i know i have posted on this a few hours ago, but i dont think the question was very well put and i think its phrased better here.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement