I'm trying to make cts .
Here is the MoveLeft script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MoveLeft : MonoBehaviour
{
private float moveLeftSpeed = 10;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
transform.Translate(Vector3.left * Time.deltaTime * moveLeftSpeed);
}
}
And there is the SpinObjects script:
using System.Collections.Generic;
using UnityEngine;
public class SpinObjectsX : MonoBehaviour
{
public float spinSpeed = 50;
// Update is called once per frame
void Update()
{
transform.Rotate(new Vector3(0, Time.deltaTime * spinSpeed, 0));
}
}
I expect the object's movement will look like this, it just moves to the left and spins itself.
But when I use both scripts, the object moves very weirdly, it is still spinning itself but instead of moving to the left, it spins around something...
