Browse Source

- PointForceControllerToy now doesn't add objects to the controller as this is redundant.
- Set the point-force controller to defaults for the toy (for now use linear force).

MelvMay-GG 12 years ago
parent
commit
26f40f1
1 changed files with 3 additions and 3 deletions
  1. 3 3
      modules/PointForceControllerToy/1/main.cs

+ 3 - 3
modules/PointForceControllerToy/1/main.cs

@@ -157,9 +157,6 @@ function PointForceControllerToy::createPointForceController( %this )
         %sprite.Frame = getRandom( 0, 55 );
         %sprite.createPolygonBoxCollisionShape( %sizeX, %sizeY );
         %sprite.setAngularVelocity(getRandom(-180,180));
-        
-        // Add to the controller.
-        %controller.add( %sprite );
     }   
     
 }
@@ -174,6 +171,9 @@ function PointForceControllerToy::updatePointForceController( %this )
     // Update the controller.
     %controller.Radius = %this.ForceRadius;
     %controller.Force = %this.ForceMagnitude;
+    %controller.NonLinear = false;
+    %controller.LinearDrag = 0.0;
+    %controller.AngularDrag = 0.0;
 }
 
 //-----------------------------------------------------------------------------