Im new to coding so I apologize if this sounds ignorant… But im trying to multiply my move speed with time.deltatime and it stops my player from moving entirely. From my understanding it just multiplies my speed by a factor like .1 making it 1/10 as fast but at a set time thats independent of framerate, correct? If i remove time.deltatime my character moves, add it it doesnt. Im aware fixedupdate is set but I seen someone say do deltatime anyway but ive tried both fixedupdate and just update and it does the same thing… I just started this script about 20 minutes ago so its still premature;
public class Movement : MonoBehaviour
{
Rigidbody2D rb2d;
public float horizontalMovement = 0f;
public float movementSpeed = 80f;
public float jumpForce = 60f;
// Start is called before the first frame update
void Start()
{
rb2d = GetComponent();
}
private void FixedUpdate()
{
float horizontalMovement = Input.GetAxis(“Horizontal”) * movementSpeed;
rb2d.velocity = new Vector2 (horizontalMovement * Time.deltaTime, 0);
}
}