Hi,
I have created a terrain with perlin noise, I then use the height data array created in a terrain object from your library. The collision works great, however it seems to collide bellow the visual render of the terrain, which I didn't expect since they both use the same height data. I have also set the thickness of the terrain to 5 just to ensure that it wasn't that. I have also check that the position of the terrain object matches with the position of the visible render and it does.
Any ideas?
Comments: For future reference, I usually check the BEPUphysics forums more often than the codeplex issues; that would be a better place for most general questions. That said, I'm not exactly sure what you are observing, so here's a few possibilities: >however it seems to collide bellow the visual render of the terrain, which I didn't expect since they both use the same height data. ... I have also check that the position of the terrain object matches with the position of the visible render and it does. Does this imply that you've verified that there is no offset by e.g. using the BEPUphysicsDrawer? If there is no translation offset, might there be a different scaling transform applied to the graphics and collidable? If the terrain positioning matches up such that the vertices are truly in exactly the same locations but there is still inconsistency between the graphics and physics, it's probably the triangle organization. Setting the terrain shape's QuadTriangleOrganization to the opposite may bring it into alignment. If the mesh's quad layout is inconsistent, the terrain won't be able to match it and the mesh will need to be modified. >I have also set the thickness of the terrain to 5 just to ensure that it wasn't that. Thickness increases the collision volume of the terrain downward. If by 'collide below the visual render of the terrain' you mean colliding with a volume beneath the terrain, then that would be expected with nonzero thickness.
I have created a terrain with perlin noise, I then use the height data array created in a terrain object from your library. The collision works great, however it seems to collide bellow the visual render of the terrain, which I didn't expect since they both use the same height data. I have also set the thickness of the terrain to 5 just to ensure that it wasn't that. I have also check that the position of the terrain object matches with the position of the visible render and it does.
Any ideas?
Comments: For future reference, I usually check the BEPUphysics forums more often than the codeplex issues; that would be a better place for most general questions. That said, I'm not exactly sure what you are observing, so here's a few possibilities: >however it seems to collide bellow the visual render of the terrain, which I didn't expect since they both use the same height data. ... I have also check that the position of the terrain object matches with the position of the visible render and it does. Does this imply that you've verified that there is no offset by e.g. using the BEPUphysicsDrawer? If there is no translation offset, might there be a different scaling transform applied to the graphics and collidable? If the terrain positioning matches up such that the vertices are truly in exactly the same locations but there is still inconsistency between the graphics and physics, it's probably the triangle organization. Setting the terrain shape's QuadTriangleOrganization to the opposite may bring it into alignment. If the mesh's quad layout is inconsistent, the terrain won't be able to match it and the mesh will need to be modified. >I have also set the thickness of the terrain to 5 just to ensure that it wasn't that. Thickness increases the collision volume of the terrain downward. If by 'collide below the visual render of the terrain' you mean colliding with a volume beneath the terrain, then that would be expected with nonzero thickness.