Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help finishing this code for C# It is for simple harmonic motion( of a cube in Visual Studio), I have typed in some of

Need help finishing this code for C#

It is for simple harmonic motion( of a cube in Visual Studio), I have typed in some of it but last part is not finished....

using System.collections;

using System.collections. Generic;

using UnityEngine;

public class MoveObject : MonoBehaviour

{

publict float rotationalSpeed;//[degrees/sec]]

// Start is called before the first fram

void Start()

{

}

// Update is called once per frame

void Update()

{

// transform.Rotate(0.0f, rotational Speed*Time.deltaTime, 0.0f):

//

// move the cube in simple harmonic motion

// Hints

// explore the Mathf structure and use the Mathf.Cos() function

// use the transform.position property an define

// transform.position =new Vector3(A*Cos(2*pi*f*time), 0.5f, 0.0f);

// define variables for Amplitude an frequency

} }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions

Question

=+b. Create a tagline.

Answered: 1 week ago