Jump to content


Mouse-controlled Melee


1 reply to this topic

#1 Smeagol3

    New Member

  • Members
  • Pip
  • 1 posts

Posted 27 May 2006 - 03:35 AM

I'm working on a gladiator combat game and I need to implement a system where the sword follows the mouse, ala Die By The Sword. How would I go about implementing this?

Thanks,
Smeagol

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 27 May 2006 - 04:08 AM

Google for "inverse kinematics". Basically, you have a skinned model (presumably), you map the mouse location into the location in space of a point on the sword (simple linear transformation, probably), and then use IK to solve for the bone position of the model that will bring the sword where you want it.
reedbeta.com - developer blog, OpenGL demos, and other projects





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users