| 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: |
| Weapons and objects.; How do you hold them? | |
|---|---|
| Tweet Topic Started: Sep 27 2007, 09:55 PM (665 Views) | |
| NEED HELP sorta | Sep 27 2007, 09:55 PM Post #1 |
|
Member
![]() ![]() ![]() ![]()
|
I've been wondering, is there a way to get the current rotation of a given bone and get a x,y,z world space coordinate of where that bone is at? I'm wondering because I'd like to have my characters hold random objects and things in there hands and put on different clothes and things like that. I know there is
But what does that return exactly? It says it returns a matrix, but how can I use a matrix to get the coordinates I want? The manual says:
But I wouldn't know how to go about using it's information. What do you know about this? Edit: Darnit! Sorry, I wasn't paying close enough attention to where I posted this, I thought I was in a different subforum. |
![]() |
|
| Rixeno | Sep 27 2007, 10:55 PM Post #2 |
![]()
Teo-Carliss
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Yeah, this should probably be moved
....
|
|
Report spam the nanosecond you see it. Ninjas are everywhere, for all you know there are eleven behind you right now, including me... | |
![]() |
|
| NEED HELP sorta | Sep 28 2007, 02:46 AM Post #3 |
|
Member
![]() ![]() ![]() ![]()
|
Yeah, I've already reported requesting a move. Anyway, do you have any hints? :rolleyes: |
![]() |
|
| $pecter | Sep 28 2007, 06:06 AM Post #4 |
|
Elite Member
![]() ![]() ![]() ![]() ![]() ![]()
|
Perhaps this topic could help. |
![]() |
|
| MysteriXYZ | Sep 28 2007, 12:38 PM Post #5 |
|
Master Matrix Masher
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
To retrieve coordinates from a matrix, you need to transform the null vector <0,0,0> with it and then use GetVector(...) to obtain x/y/z from it. To get the rotx/y/z angles from the matrix, you can use ComputeMatrixRotationAngles(...):
Then this topic might offer some help (especially my last post ), as it seems to deal with a similar problem.
|
| U3D is like candy; after extensive consumption, it's Best to brush. | |
![]() |
|
| NEED HELP sorta | Sep 29 2007, 06:37 AM Post #6 |
|
Member
![]() ![]() ![]() ![]()
|
Thanks! That all helps a tremendous amount. Your code there is all I needed MysteriXYZ, thanks very much. The only problem is that in this case I drew a little wall and the arm rotates one direction and the wall the other direction like this. | arm | wall / arm \ wall \ arm / wall I can tell I need to reverse one of the rotations I suppose, so I'll keep trying. Edit: LOL, that was as easy to fix as I thought it would be. Anyway, thanks a lot for that. Now all I have to do is figure out how to get the animations to run smoothly instead of jumping on the seams. |
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |





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




....
2:34 AM Jul 11