Collision problems with ConvexHulls and StaticMeshes
Posted: Sat Feb 25, 2012 5:01 pm
In the game, the world is made up of obstacles which are StaticMeshes created from FBX model files, these are static objects.
The enemies and the player are ConvexHulls created from FBX model files, these are dynamic objects.
At the moment, as the player if you move into an enemy it pushes them out of the way, however, if you move into one of the obstacles, the player's ConvexHull "pushes" through the obstacle, which "messes" it up as it ends up with the player's character (a ship-like thing) to be point slightly to the floor and so controls then mess up (as the player can only move/rotate in x and z directions and so is fixed to floor and cannot look up and down. Therefore, it being tipped slightly messes up the controls.
If you sit next to an obstacle and then rotate round the edge of the player's ship can go into the obstacle and so when it rotates round it moves vertically up the obstacle ending up in the air before moving away to fall back to the floor.
I cannot work out why the player can move through the obstacle StaticMeshes instead of being pushed off them like you are when you push into enemies. And why the collisions don't seem to be working properly.
Any ideas what could be causing it?
The enemies and the player are ConvexHulls created from FBX model files, these are dynamic objects.
At the moment, as the player if you move into an enemy it pushes them out of the way, however, if you move into one of the obstacles, the player's ConvexHull "pushes" through the obstacle, which "messes" it up as it ends up with the player's character (a ship-like thing) to be point slightly to the floor and so controls then mess up (as the player can only move/rotate in x and z directions and so is fixed to floor and cannot look up and down. Therefore, it being tipped slightly messes up the controls.
If you sit next to an obstacle and then rotate round the edge of the player's ship can go into the obstacle and so when it rotates round it moves vertically up the obstacle ending up in the air before moving away to fall back to the floor.
I cannot work out why the player can move through the obstacle StaticMeshes instead of being pushed off them like you are when you push into enemies. And why the collisions don't seem to be working properly.
Any ideas what could be causing it?