Moving Platform 3D
My platforms only move in the z axes while the script says that it must move in the x axes, I messed up something using System.Collections; using System.Collections.Generic; using UnityEngine; public class MovePlatform : MonoBehaviour { [SerializeField] private float ObjectSpeed = 1; private float resetPosition = 29.3f; void Update() { transform.Translate(Vector3.left * (ObjectSpeed * Time.deltaTime)); if(transform.localPosition.x <= resetPosition) { Vector3 newPos = new Vector3(178.4f, transform.position.y, transform.position.z); transform.position = newPos; } } }
Answer by CeciPeque · Nov 09, 2017 at 12:48 PM
don't worry it is fixed it was transform.Translate(Vector3.back (ObjectSpeed Time.deltaTime));
Your answer
![](https://koobas.hobune.stream/wayback/20220612142614im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity 3D: Third person movement and mouse camera control 0 Answers
How to find match in 4 in a Row Game. 1 Answer
Why isn't my player moving down? 0 Answers
Using spawners script variable to set relevant speed of an Enemy... Im bewildered 1 Answer
How to get 2D blocks to break after a certain amount of hits 0 Answers