- Home /
Adding torque to a 2D hinge joint motor until its pointing in the direction of a joysick
So I'm trying to make a game where you control a players legs with analogue sticks on a (n Xbox) controller. The legs are made up of four parts (thigh, knee, shin, foot; if it helps to know...) I've tried adding force to the feet of the player but of course that just pulls the whole player behind it. So I started playing with the motors on the legs and found that, hey, this might be what I need! So now I am at a complete loss as of how to approach this... I need to change the motor through script, rotate/point it in the direction that a joystick is facing, then stop it there until the joystick moves again (I guess if the joystick is in its default position the motor could just be turned off). If anyone out there has a hint or any advice to help me out I could not thank you enough.
Thank you,
SpaceBird_
Your answer
Follow this Question
Related Questions
How to move player with xbox controller 1 Answer
Moving player using character controller with new input system 1 Answer
CharacterController sprint functionality. 1 Answer
Mouse movement swings character around in circles 1 Answer
How to get movementDirection using CharacterController but without input.GetAxis ? 0 Answers