Jump to content

  • Log In with Google      Sign In   
  • Create Account


Collision detection


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 ReyLitch   Members   -  Reputation: 144

Like
0Likes
Like

Posted 16 September 2012 - 11:48 AM

Hi again,

I am developing a 3D platformer game in XNA. Despite being a completely 3D, the player only moves on two dimensiones (2.5D). In this moment I am trying to detect colision between the main player and ground of the scene. For best performance, I implemented an octree in which I add all scene. Until now I have just used it to not having to paint the entire scene in each iteration of the main loop. The main player is not included in the octree and I don't know if I have to include it. I would not have to go completely octree for check if the player collision with the ground, is it possible?

Thanks in advance.

PD: Sorry for my English's level.

Sponsor:

#2 kauna   Crossbones+   -  Reputation: 2279

Like
0Likes
Like

Posted 16 September 2012 - 07:38 PM

Hi,

In my opinion, your player doesn't have to be "in" the octree structure. You may well just run queries to the tree to find the nearest blocks to the player and then run your collision detection routine to the blocks you have found. Of course, if you'll need to implement entity vs player collision queries, then your player may have to part of the octree.

On the other hand, if your culling octree structure doesn't fit to your needs on collision detection, you may have another tree which suits better for finding the collision objects. As a matter of fact, typically these two needs don't go well together, at least in more complex scenarios.

The collision routine can be and should be something separated from your octree. The octree just is tree structure to accelerate spatial queries based on some criteria.

Cheers!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS