generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Inverse Kinematics using multiple welds?

Previous Thread :: Next Thread 
Lucas_Lua is not online. Lucas_Lua
Joined: 18 Jun 2008
Total Posts: 7521
18 May 2016 10:47 AM
For those who don't know, inverse kinematics is the process of doing the opposite of kinematics. Kinematics is finding the end position or target of a set of joints using their angles. Inverse Kinematics is finding the angles of the same set of joints given the end position or target.

I'm trying to do this with welds, but I can't wrap my mind around how to calculate the new end position without actually changing the welds. Its like I've completely forgotten how CFrame works. Any help?

I put a part where I want a model to rotate on (like a leg or foreleg) and then weld all the model pieces to that joint part. Then I weld the joint part to its "parent joint" such as the hip or torso. This is in such a way that the Torso is the top of the joint hierarchy, and the angles of the joints are all at 0 degrees (the legs being completely straight). There's a joint for the hip, knee and foot parts, at their expected anatomical positions.

For example, rotating the hip by 5 degrees will rotate the entire structure by 5 degrees. Rotating the knee joint by 5 degrees will rotate everything from the knee down by 5 degrees.

So for calculating the end point, could I start at the top of the hierarchy for a particular joint structure and work my way down, multiplying a CFrame value by whatever the current CFrame of the weld is plus the new angle?
Report Abuse
KapKing47 is not online. KapKing47
Joined: 09 Sep 2012
Total Posts: 5522
18 May 2016 11:07 AM
I would suggest getting the length of the structure (Lets just say as an example, from hip joint down to knee joint, and "toes". So the total length) then, see if u rotate it and it happens to appear to be either past or not at the target then see what happens when u rotate the hip joint. <- just an example.
I can't think of how to do the math right now as am sleep deprived, but as soon as I get some memory back I'll post.
Report Abuse
ElectroTM is not online. ElectroTM
Joined: 23 Nov 2012
Total Posts: 1135
18 May 2016 11:36 AM
lol.


Report Abuse
EgoMoose is not online. EgoMoose
Joined: 04 Feb 2009
Total Posts: 2896
18 May 2016 11:38 AM
http://wiki.roblox.com/index.php?title=Inverse_kinematics
Report Abuse
Lucas_Lua is not online. Lucas_Lua
Joined: 18 Jun 2008
Total Posts: 7521
18 May 2016 12:30 PM
That is exactly what I needed! Thanks! I had no idea the wiki had an article about this.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image