I'm messing around a bit trying to create a table football table. So this involves create rods with players on them. The rod should be free to rotate around the Z axis with the players moving around the rods Z axis. I created a parent object for the rod with players to do any transforms on. I made sure that the pivot point is in the center of the rod so that rotating along the Z axis of the game object keeps the rod in its position while rotating. This worked as shown in the first picture, the object position remains unchanged while rotating. enter image description here

The problem comes in when I run the game and have a ball collide with the 'player', this starts the player and rod spinning, but not around the right pivot point. The rod now moves in a circular/eliptical pattern. I checked that the rotation isn't happening around the center point either and it isn't. It rotates around an axis somewhere between the center point and the pivot point. Am I doing something wrong or am I tackling this from the complete wrong angle completely?

  • \$\begingroup\$ Have you tried using a hinge joint on the axis you want to control, or setting the center of mass to lie on that axis? \$\endgroup\$ – DMGregory Nov 19 '19 at 19:34
  • \$\begingroup\$ @DMGregory The hinge point did the trick! Thank you! \$\endgroup\$ – mtbrands Nov 20 '19 at 7:11
  • \$\begingroup\$ If you've solved your problem, please post an answer illustrating/explaining how you solved it (eg. what hinge joint settings you used) \$\endgroup\$ – DMGregory Nov 20 '19 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.