Sunday, April 8, 2012

Sword Detection Progress

Making some awesome progress! I've gotten to the point where objects can be programmed to react when a weapon hits them. So things like monsters should be quite simple to make now. The "Hit-able" objects are represented with a bunch of spheres, inside of one big sphere. When the player swings a weapon, the engine does a ray-test to determine if the weapon hits the big sphere, and if so, checks to see if it hits one of the smaller spheres that make up a model.

In other words, you actually have to "hit" an object for the game to think you've hit something!

A smaller sphere in a test-torch

Hitting the torch, lights it!

A view of some of the collision bounds. Red = obstacle, Blue = big sphere check, Green = small sphere check

A better view of some "big-spheres"

1 comment:

  1. Very nice, sir. Very nice.

    Perhaps we should collaborate on a project together after we both finish our current projects?

    --Full Metal.