Week5 Sprint

For this week, I was working on this texture


There are two models for the ramp



This is a scrolling script
    float offsetX, offsetY, realtime;
    new Vector2 origin;
    public float speed = 1; // make it -0.1 in Unity
    public double rooptime = 3.9;
    void Start()
    {
        offsetX = this.GetComponent<Renderer>().material.mainTextureOffset.x;
        offsetY = this.GetComponent<Renderer>().material.mainTextureOffset.y;
        origin = new Vector2(offsetX, offsetY);
    }

    void Update()
    {
        realtime += Time.deltaTime;
        offsetY = realtime * speed;
        this.GetComponent<Renderer>().material.mainTextureOffset = new Vector2(offsetX, offsetY);
        if(realtime > rooptime)
        {
            realtime = 0;
        }
    }

I made transparent area and place UV of ramp top, and this is albedo texture map.
UV of Ramp Top moves from top to bottom


Comments

Popular posts from this blog

Weekly Blog Final : Diner

Weekly Blog 13 : environment design for Unreal Engine

Weekly Blog 14 : Props and bush