Notable to understand what is happening

How solve this

This is code

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[DisallowMultipleComponent]
public class Oscillatos : MonoBehaviour
{
    [SerializeField] Vector3 movementVector;   
    [Range(0,1)]    
    [SerializeField]      
    float movementFatcor;
    Vector3 startingPos;
    // Start is called before the first frame update
    void Start()
    {
        Vector3 startingPos = transform.position;
    }

    // Update is called once per frame
    void Update()
    {
        Vector3 offset = movementVector * movementFatcor;
        transform.position = startingPos + offset;
    }
}

Hi Krishna,

Since your obstacles are parented to a game object, check if something changes the position of that parent. The position of a child in its Inspector is relative to the parent position.

I was solve this .I just made two Parent on single object .
And also the parent object transform positions, was on the prefab transform positions.
which may made problem to occur.I can’t tell this are exactly reason for problem.

Some things about ‘Resources’ , I’m not able download the downloadable zip.file ,(like sound effect and particle effect)it shows this when I do it :

Once again thank you ,sir. To help

Did you click the left mouse button on the file?

If you cannot download anything from the resources, please message the Udemy support. Maybe there is a technical issue on their website.

This topic was automatically closed after 14 days. New replies are no longer allowed.

Privacy & Terms