SketchyPhysicsWiki
No edit summary
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
In the onTick property, you can write in a Ruby script that will run in a set interval.
+
In the onTick property, you can write in a [[Ruby | Ruby script]] that will run in a set interval.
   
   
   
 
'''Extra info:'''
 
'''Extra info:'''
{|cellspacing="1" cellpadding="1" width="100" align="right" border="1"
+
{| align="right" border="1" cellpadding="1" cellspacing="1" width="100"
|+Other Properties
+
|+Other Properties:
 
|[[Magnet]]
 
|[[Magnet]]
 
|-
 
|-
Line 16: Line 16:
 
|[[onTick]]
 
|[[onTick]]
 
|}
 
|}
*If you want to disable the script of an object you can simply uncheck the onTick checkbox, the script will stay on that object, but it will not run in the simulation
+
*If you want to disable the script of an object you can simply uncheck the onTick checkbox; the script will stay on that object, but it will not run in the simulation
*If you mark an objeck as 'Ignore,' its scripts will be ignored as well.
+
*If you mark an object as 'Ignore,' its scripts will be ignored as well.
 
*Remember that every script will increase lag/lower simulation speed, so keep them short and simple.
 
*Remember that every script will increase lag/lower simulation speed, so keep them short and simple.
 
*The script in onTick field will be run on every frame of simulation by default, or at the frame-rate you input in the rate field.
 
*The script in onTick field will be run on every frame of simulation by default, or at the frame-rate you input in the rate field.

Latest revision as of 08:45, 6 March 2011

In the onTick property, you can write in a Ruby script that will run in a set interval.


Extra info:

Other Properties:
Magnet
Thruster
Emitter
onTouch
onTick
  • If you want to disable the script of an object you can simply uncheck the onTick checkbox; the script will stay on that object, but it will not run in the simulation
  • If you mark an object as 'Ignore,' its scripts will be ignored as well.
  • Remember that every script will increase lag/lower simulation speed, so keep them short and simple.
  • The script in onTick field will be run on every frame of simulation by default, or at the frame-rate you input in the rate field.
  • A high rate is useful for initialization because that script will then only run on frame 0 (the start of simulation).
  • Even a low rate can attribute to huge lag/speed improvements, because an onTick field with rate of 5 will use 5x less computing power then he one with rate of 0 or 1.