ballcontrol fail!!!!

Updated on January 9, 2017 in [A] Unity Scripting
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
8 on September 1, 2014

I get erors look like:
found *;*
expect. Insert a semicolon at the end.

I have type:

#pragma strict
var rotationspeed = 100;
function Update ()
{
var rotation : float = Input.GetAxis ("horizontal") * rotationspeed;
rotation *=Time.DeltaTime;
rigidbody.AddRelativeTorque (Vector3.back * rotation;
}

  • Liked by
Reply
0 on September 1, 2014
rigidbody.AddRelativeTorque (Vector3.back * rotation;From tehpson

put a “)” before the “;” at the end of this line   ^_^

  • Liked by
Reply
Cancel
0 on September 1, 2014

ok thanks it was hard to se xD

  • Liked by
Reply
Cancel
1 on January 2, 2017

Didn`t Work for me

Devoted
on January 2, 2017

Why would it? You probably have a completely different problem. Don’t update existing posts. First check if anyone has the solution, if it works, great, if it doesn’t, don’t reply to the existing one. Instead, make your own thread.

Show more replies
  • Liked by
Reply
Cancel
2 on January 9, 2017

Can someone help my i have typed :

#pragma strict
var rotationspeed = 100;
function Update ()
{
var rotation : float = Input.GetAxis ("horizontal") * rotationspeed;
rotation *=Time.DeltaTime;
rigidbody.AddRelativeTorque (Vector3.back * rotation);
}

Problems

Assets/BallControl.js(6,17): BCE0019: 'DeltaTime' is not a member of 'UnityEngine.Time'. Did you mean 'deltaTime'?

Assets/BallControl.js(7,1): BCE0144: 'UnityEngine.Component.rigidbody' is obsolete. Property rigidbody has been deprecated. Use GetComponent<Rigidbody>() instead. (UnityUpgradable)

Assets/BallControl.js(7,11): BCE0019: 'AddRelativeTorque' is not a member of 'UnityEngine.Component'. 

Devoted
on January 9, 2017

Horizontal needs to have a capital H. But next time please open a new thread.

Devoted
on January 9, 2017

Dammit, I can’t delete my post on mobile, and my solution was worng… Please open a new thread, I don’t want to answer here.

Show more replies
  • Liked by
Reply
Cancel
0 on January 9, 2017
  • Liked by
Reply
Cancel