Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function rt(name : String, x : float, y : float, z : float){
- //rotate
- //example
- //Declarations
- //qb("cars",0,0,0);qb("cars",2,0,0);qb("planes",4,0,0);cl("cars",Color.red);
- //Update function
- //rt("cars",10,10,10);
- if(name=="camera") {
- var theCamera : GameObject = Camera.main.gameObject;
- theCamera.transform.transform.Rotate(x*Time.deltaTime,y*Time.deltaTime,z*Time.deltaTime);
- return;
- }
- for (var cube :GameObject in cubes) {//this for loop doesnt behave as the regular browser one which woudl return the index, it acutally returns the object
- if(cube.transform.name==name) cube.transform.Rotate(x*Time.deltaTime,y*Time.deltaTime,z*Time.deltaTime);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement