Hallo ever body
What I have done
I have made a small game in unity3d this has one ship and one asteroid
I have made this program using JavaScript under instruction from the Walker boy’s site
What happened?
Well the game runs ok but it jerks sporadically
I seem to remember using other programs that used double buffering to counter
This type of problem
Is any type of double buffering available in Uinty3d?
Or is double buffering only available in the Unity3d pro version?
Thanks in advance
this is my code of the asteriod
enter code here
// Asteroid Script
// Inpsector variables
var asteroidSpeed : float=6.0;
var explosion :Transform;
var sceneManger : GameObject;
// private variables
function Update ()
{
transform.Translate(Vector3.downasteroidSpeedTime.deltaTime); // this is the sceond method of moving an object
// check for the bottom of the screen
if(transform.position.y <=-6) // check to see if the asteroid has moved of screen
{
RestEnemy(); // jump to function RestEnemy and the return here
}
}
function OnTriggerEnter(other : Collider)
{
if(other.gameObject.tag == "Player")
{
other.GetComponent("Script_Player").howManylives -= 1;
// Tell the score manger we Lost a life
sceneManger.transform.GetComponent("Script_SceneManger").lives();
Instantiate(explosion,transform.position,transform.rotation);
RestEnemy(); // jump to function RestEnemy and the return here
}
}
function RestEnemy()
{
transform.position.y=8; // return to top of the screen
transform.position.x=Random.Range(-7,7); // select a new random x position for the
}
Software : free Unity3D version 3.4.4.2
OS Windows 7 Ultimate 64bit service Pack 1
Computer Intel i7-2600K CPU 3.40 GHz Ram 4.00 GB
Graphics card NVIDIA GeForce GTX 285 Direct X 11.0 Driver version 275.33