Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i need the output Example code of Find Object using System.Collections; using System.Collections.Generic; using UnityEngine; public class Mouse : MonoBehaviour { // Use this for
i need the output
Example code of Find Object using System.Collections; using System.Collections.Generic; using UnityEngine; public class Mouse : MonoBehaviour \{ // Use this for initialization //Light lightComponent; public Game0bject target; void Start () \{ // A variable to store the light component. target = Game0bject. Find( "Cube"); \} // Update is called once per frame void Update () \{ target.transform. Translate (.05f,0f,0f); target.transform. Rotate( 0f,0f,1f); target. transform. LocalScale = new Vector 3(1.5f,1.5f,1.5f); \} void Start() \{ \} // Update is called once per frame void Update() \{ Ray ray = new Ray(transform. position, Vector3.down); if (Physics.Raycast(ray, 10)) \{ Debug. DrawRay (ray . origin, ray.direction * 10); Vector 3 forceAmount = new Vector3(,20,); rb. AddForce(forceAmount); \} \} Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started