I think I played this about 15-17 years ago, when I first got my own PS2. I'd proudly bought some games for what seemed like quite the bargain, only to find out that there was a good reason that they were so cheap. One of them started off on a beach. You had to solve a puzzle, I think a fairly easy one, to point some cannons (I remember there being three of them) at a cliff face and fire them to open up the cave. After that, my memories are a bit sketchier, but I think I remember having to fight skeletons and, near the end of the level, a worm that moved in and out of the cave faces. I think there was a mix of sword-fighting and gunplay, although the latter was pretty limited. If I recall correctly, the plot of the game was that you were searching for pirate treasure, but I think wound up trapped in the cave, fighting undead pirates, for the purpose of survival.
The perspective was mainly third-person over the shoulder. This being well over a decade ago, and the game not exactly thrilling me at the time, I don't really remember many other details.