# math problem for a script

This topic is 5065 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

i have a x,y,z point named root it is located at -4,18,0 and a l_hip located at 2,15,0 i am trying to find the point that mirrors the l_hip and name it r_hip and i want it to be the same distance away from root i am setting up a character rig and i want to be able to set the root and left leg and mirror it over to the right any help is appreciated -__________________root________________________- -______________________________________________- -______________________________________________- -______r_hip___________________l_hip___________-

##### Share on other sites
Use the plane equation of the mirror plane to find the distance of l_hip from the plane. Then project the l_hip coord onto the mirror plane and minus the plane norm scaled by the above distance from this projected point to find the location of r_hip. This is how to do it for arbitrary cases but I'm guessing you only want to mirror across the y-z plane. In that case:

r_hip.x = 2*root.x - l_hip.x
r_hip.y = l_hip.y
r_hip.z = l_hip.z

##### Share on other sites
You need a reflection about the Y-axis...And I forgot what the matrix look like...Something along the line of

1 0
0 -1

1. 1
2. 2
3. 3
Rutin
18
4. 4
5. 5
JoeJ
13

• 14
• 10
• 23
• 9
• 50
• ### Forum Statistics

• Total Topics
632639
• Total Posts
3007592
• ### Who's Online (See full list)

There are no registered users currently online

×