I've been trying to impelement a WorldMove method that we will be using for character movement. I was instructed to have it take a desired worldposition and a correction vector as parameters.
So i basically apply the desired position to the cylinder, and then performDiscreteCollision between the cylinder and static and dynamic objects iteratively if they are in AABB collision. Then I return the correction vector and decide wether or not to move it in player code. It seems like others are using impulses to move their characters, but I know that we need the ability to place a character (and possibly any object) anywhere at will and if its colliding correct it.
This is somewhat working but the normal for the correction sometimes comes back wrong when colliding with a BVHTriangleMesh (which I'm using for terrain). It seems that the only reason this could happen is if its testing collision on triangle edges (made sure triangles aren't wound backwards), which i don't think i want on the terrain. Is there a way to disable testing for edge collision on a triangle? Looks like it takes place in GJK and would be hard to do.
Any general pointers for what I'm doing here would be greaty appreciated.
Thanks,
bino
character cylinder move
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA