Question by
ZockerRocker · Apr 17, 2019 at 08:05 AM ·
programming
How to make a Ragdoll move?
I tried this script from a Tutorial : using System.Collections; using System.Collections.Generic; using UnityEngine;
public class C : MonoBehaviour { public float speed;
private Rigidbody2D rb;
private Vector2 moveVelocity;
void Start()
{
rb = GetComponent<Rigidbody2D>();
}
void Update()
{
Vector2 moveInput = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));
moveVelocity = moveInput.normalized * speed;
}
void FixedUpdate()
{
rb.MovePosition(rb.position + moveVelocity * Time.fixedDeltaTime);
}
}
But i cant move it :c (Trying it in Unity qwhen click the Playbutton on the top of the game)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612195530im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Missing Reference Exception 1 Answer
Check if a boolean is true by use of a string 2 Answers
Photon not working/detected 2 Answers
How to use collision detection properly? 0 Answers