T3D Lock on feature (concept)
by Kevin Mitchell · 06/28/2011 (7:17 pm) · 1 comments
This is just a resource showing my outline and plan to make a lock on feature for T3D, hopefully this can show people ways to brain storm ideas get them sounding correct, and help them map everything out before starting a feature or expansion. This isn't a law or rule it's just how I usually brainstorm ideas.
My theory of locking onto an enemy:
locking on to a target should be as simple as calculating the circumference movement on a circle with the lock on target working as the center of the circumference. Making the distance between you and the target, the diameter. Now this should limit the character movement to forward, left step and right step, and backward.
The link for lockon should break if the diameter reaches N distance. The players forward movement should be twice as much as it's side step. Leaving side step as half of the normal forward step. The speed of the side step should become the angle displacement around the circumference between you and the lock on target. Leaving a lock on dodge to be 2 to 3 times the side angle displacement.
At all times the camera will constantly be updated to look at target. Target can be added to the player data as a data block pointer to the target object to obtain world position info. Using the distance of the target and player to get diameter. Also a look at point. And using trig to find the displacement to move to every side step
With this I believe I can make a lock on feature to T3D... Let's see if this is as easy to code as it was to explain.
My theory of locking onto an enemy:
locking on to a target should be as simple as calculating the circumference movement on a circle with the lock on target working as the center of the circumference. Making the distance between you and the target, the diameter. Now this should limit the character movement to forward, left step and right step, and backward.
The link for lockon should break if the diameter reaches N distance. The players forward movement should be twice as much as it's side step. Leaving side step as half of the normal forward step. The speed of the side step should become the angle displacement around the circumference between you and the lock on target. Leaving a lock on dodge to be 2 to 3 times the side angle displacement.
At all times the camera will constantly be updated to look at target. Target can be added to the player data as a data block pointer to the target object to obtain world position info. Using the distance of the target and player to get diameter. Also a look at point. And using trig to find the displacement to move to every side step
With this I believe I can make a lock on feature to T3D... Let's see if this is as easy to code as it was to explain.
About the author
Riding Solo since 2005. Current Project: Fated World 2005-Present RPG Engine Tool Kit - Now available.

Associate Scott Burns
GG Alumni