| We hope you enjoy your visit. You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you are already a member please log in to your account to access all of our features: |
| Getting Bone's world position? | |
|---|---|
| Tweet Topic Started: Mar 26 2009, 01:37 PM (439 Views) | |
| Satyr | Mar 26 2009, 01:37 PM Post #1 |
|
Captain Gobblecoque
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Hey all, I have been working on a little zombie shooter, and i have a bone for muzzle flashes and light in my view model for my gun, but i do not know how to get the x,y and z of that bone. i looked at the align weapon to hand example, but it looks like it involves setting up a transformation matrix and adjusting the values until they are correct, which is not really what i had in mind, specially if i want multiple weapons. any help would be appreciated, thanks. |
|
The feeling of homesickness never goes away when you return to your parents home from years of being away. same goes with the smell of ash and smoke from the day you set it ablaze. | |
![]() |
|
| MysteriXYZ | Mar 26 2009, 03:01 PM Post #2 |
|
Master Matrix Masher
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Try the following:
|
| U3D is like candy; after extensive consumption, it's Best to brush. | |
![]() |
|
| Satyr | Mar 31 2009, 01:51 PM Post #3 |
|
Captain Gobblecoque
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Due to the circumstances of me loosing my entire project folder. I cant really check to see what it does. Plus the code doesn't really make too much sense, because of the matrix and vector usage, which i have not used ever. so can you explain what happens through the code, shouldn't be too hard, and would help this small child rest in peace wrapped up in the new found knowledge as to how to use vectors and matrices. Give a programmer a snippet, fill one space in a project, Teach the programmer how to make the snippet, fill that space in unlimited amounts of projects. |
|
The feeling of homesickness never goes away when you return to your parents home from years of being away. same goes with the smell of ash and smoke from the day you set it ablaze. | |
![]() |
|
| MysteriXYZ | Mar 31 2009, 08:20 PM Post #4 |
|
Master Matrix Masher
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Yes, I should have explained a bit more, so I'll try to do that now .
So you need the name of the bone you're using (which you gave it in your modelling program), to get access to its transformation matrix. This matrix contains information about its location, orientation and scaling. Since all you need to know is the position (x,y,z) of the bone, you use ComputeMatrixTranslation(...) which gives you just that, as a vector. The components of that vector (which you get using GetVector(...)) are the x, y and z of the bone, respectively. Better ?A deeper explanation of vectors and matrices is beyond the scope of my job description .
|
| U3D is like candy; after extensive consumption, it's Best to brush. | |
![]() |
|
| Satyr | Apr 1 2009, 08:58 AM Post #5 |
|
Captain Gobblecoque
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
thanks for the help dude, got it working. pretty understandable now =D |
|
The feeling of homesickness never goes away when you return to your parents home from years of being away. same goes with the smell of ash and smoke from the day you set it ablaze. | |
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |





![]](http://z1.ifrm.com/static/1/pip_r.png)



.
?
4:40 PM Jul 11