!(http://C:\Users\nyanmn\Desktop\q10 battery\scene.png) My hierarchy of game objects is as follow.
Display(Scene)!(http://C:\Users\nyanmn\Desktop\q10 battery\scene.png)
Model(-4.708, 1.55, 14.4277)
Pass(4.7080, -1.5, -14.42)
handle(-0.0236,0.65690,0.149)
shaft(5.34,-1.0225,-0.1489)
head(-7.0912,-9.62,-0.5231)
ball(0,0,0)
We can see Model and its coordinate on the image. Ball has position (0,0,0), but why it is located at the base of the Model?
How can I locate ball just beside the head?
Thanks
!(http://C:\Users\nyanmn\Desktop\q10 battery)
!(http://C:\Users\nyanmn\Desktop\q10 battery\scene.png)
!(http://C:\Users\nyanmn\Desktop\q10 battery\scene.png)
The pivot point of a model may be anywhere. Traditionally, if it’s a character model, the artist puts the pivot point between the feet. But they could instead put it at the top of the head, or the center of mass, or three feet above and to the left of his right pinky. It’s completely arbitrary.
Just move the model (or the ball) until you have them where you want them.
1 Like
Sounds like you’re talking about golf clubs? If the club has a collider only on the head, then you could use that to position the ball. (Or, perhaps, leave the ball on the ground and use this info to position the club.) Something like clubObj.GetComponent().bounds.center ought to get you the position you’re looking for.
1 Like