Deforming surfaces
- by Constantin
I try to accomplish an deforming physic behaviour for levelsurfaces, but don't get an idea how to start with the implemenation so far.
Regardless of the shape from the surface (planes, cubes, spheres…), I want to have small indentations at the positions from game-entitys (players, enemys, objects…).
It's kind of complicated to explain, so I illustrated what I'm talking about (here is an example with an sphere):
So, the surfaces should be able to deforming themselfs a little bit (to apear like an really soft bed or sofa). My surfaces need probably an high vertices count to get an smooth deforming, but my big problem is the math for calculating this deforming…
I'm programming in C/C++ with OpenGL, but will be fine with any advices in the right direction.
Any help would be highly appreciated,