AddPlane pn1 AddCube cb1 /Mass:1.0 /Position:0, 0.5, 0 AddSphere sp1 /Parent:cb1 /Scale:0.7, 0.7, 0.7 /Position:0, 0.5, 0 AddCylinder cy1 /Scale:0.25, 0.25, 0.25 /Parent:sp1 /Position:0, 0.3, 0.5 /Orientation:-90, 0, 0 AddJoystick /OnRightJoystick:f1 /OnRightButtonClick:f2 /OnLeftJoystick:f3 void f1() { x = value.X * 0.01 y = value.Y * -0.001 cb1.Rotate(0, x, 0) cb1.Translate(0, 0, y) } a = 0 void f2() { a = a + 1 d = sp1.Forward p = sp1.Position AddSphere b{a} /Bounciness:1.0 /Position:{p.X}, {p.Y + 1}, {p.Z} b{a}.AddForce(d.X*5000, d.Y*5000, d.Z*5000) PlayAudio /FileName:"LaserBeam1" } void f3() { y = value.Y * 0.01 sp1.Rotate(y, 0, 0) }