- Home /
Question by
vasiaWOW · Nov 28, 2016 at 08:03 AM ·
c#unity 5scripting problemscript.
Attach to other coordinat SpringJoint2D from code.
Attach to other coordinat SpringJoint2D from code. Here is code.
using UnityEngine;
using System.Collections;
//var object1 = "Block(1)";
public class NewBehaviourScript : MonoBehaviour
{
private SpringJoint2D myLight;
public Vector2 connectedAnchor;
void Start ()
{
myLight = GetComponent<SpringJoint2D>();
//var object1 = "Block(1)";
}
void Update ()
{
if(Input.GetKeyUp(KeyCode.Space))
{
//myLight.enabled = !myLight.enabled;
connectedAnchor = new Vector2(4.8F,4.0F);
}
}
}
and he's don't work - he's compile but not work. Sorry for my maybe mistakes i'am from russia.
Comment
Your answer
Follow this Question
Related Questions
The spaceship acceleration script is good ? And how to use it with engine ? 0 Answers
Why when creating new animator controller for the character the character is not walking right ? 0 Answers
Using AirBrakes on mobile device with Standard Assets AircraftController 0 Answers
How can i Instantiate on the terrain from left to right ? 0 Answers