What for script do i need?
Hello,
I use Unity not so long . I want to make an object larger when you persuaded the tricker a cardboard. But what kind of script to write? I use Visual studio.
Answer by CharlotteSTE · Mar 22, 2016 at 03:31 PM
I create a space after that i would actually stand . Now I want to make an Alice in Wonderland effect in the drawn world . In this case, the cube is bigger when you use the tricker of cardboard .
how to write the script for? I have no experience with how to do that.
from what i can understand, you can use onTriggerEnter() function and inside that you can change the scale property of the cube you want bigger
Okay this I can understand. But how do you write the script? I see absolutely nothing change
using UnityEngine; using System.Collections;
public class VergrootObject : $$anonymous$$onoBehaviour { void OnTriggerEnter (Collider Other) { Destroy(Other.gameObject); Vector3 scale = transform.localScale; scale.y = 5F; // your new value transform.localScale = scale; } }
and have u applied this script to the object ??
Your answer
Follow this Question
Related Questions
Unity instance missing in "Attach Unity Debugger", Visual Studio 2013. How do I fix this? 6 Answers
Open C# Project Opens Windows Explorer 0 Answers
Door keeps rotating 0 Answers
Error in camera script 1 Answer