• Advertisement

Archived

This topic is now archived and is closed to further replies.

Updating 3d Objects + Collide And Slide

This topic is 5064 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

I was wondering how everyone goes by updating their 3d obects/entities in a 3d world. I pretty much have it done, but just interested in everyone else''s approach. As of now I am just using spheres for actors, testing each actor between actors and then the terrain and moving accordingly (in which only moving actors are updated). The loop iterations O(n^2) seems a bit redundant but I figure necessary since some of the tests are fast anyway and I use my own AABB tree to sort possible colliders. So I test each actor against the rest of the actors for a collision (a swept sphere - (non moving) sphere test), then the terrain, whichever is the closest collision gets attention, the new velocity vector is made and repeat. Some accuracy is lost since I don''t use 2 moving spheres but for simple actors it really doesn''t matter and no one is the wiser. Also I wonder how you decide when an actos is on the ground? Do you cast a ray downward and if it collides within a certain distance to the sphere''s radius and the tri''s normal is below a certain degree you assume he is standing on the ground?

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement