Stops motion of an object.



This command stops the movement of an object that was initiated by commands such as Turn , Follow , Move , SetAngle , and so on. The command does not stop the motion of an object that is being moved down using the gravity command.

Sample Code

The following code uses the stop command to stop a sphere from falling after it reaches y = “100.

 oworld = New World(); ocamera = New Camera(oworld); //Create sphere 100 around, and place it at (0,300,0). osphere = oworld.CreateSphere(100,100,100) osphere.SetPosition(0,300,0); ocamera.MoveBack(1200); osphere.SetPosition(0,-2000,0,5); //Loop While(TRUE)  {   If((osphere.gety) < -100)    {     Osphere.Stop();    }  } 

Elementary Game Programming and Simulators Using Jamagic
Elementary Game Programming & Simulations Using Jamagic (Charles River Media Game Development)
ISBN: 1584502614
EAN: 2147483647
Year: 2002
Pages: 105
Authors: Sergio Perez © 2008-2017.
If you may any questions please contact us: