- Home /
Question by
atulshinde · Jan 04, 2018 at 11:31 AM ·
hingejoint2dmotor
how to set the motor speed of hingjoint2D via script ?
this is my script but its not work
using UnityEngine; using System.Collections;
public class Player: MonoBehaviour { void Start() {
HingeJoint2D hinge2D = GetComponent<HingeJoint2D>();
JointMotor motor = hinge2D.motor;
motor.motorSpeed = 50f;
hinge2D.motor = motor;
hinge.useMotor = true;
}
}
there are not any error but speed value not change
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612145817im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to make pinball flipper 0 Answers
Cannot change 2d motor speed from script 3 Answers
Adding Swimming and diving to character motor? 2 Answers
How do i get a reverse rotation happening on right click down 1 Answer
Set value of HingeJoint2D.jointAngle? 0 Answers