Game Development Reference
In-Depth Information
Figure 6-14. Throwing rule
The direction has been set to 180 + vectorToAngle() because vectorToAngle
provides the direction from the origin point to the location of the pullback. You
want to throw the projectile in the opposite direction, so this is why you use the
''180 +''.
For the speed, use a multiplicator to increase the effect. I've suggested 10 but
you can play with different values.
Hit the Preview button to test your rule.
How to Simulate an Elastic in GameSalad
Simulating the elastic in GameSalad is based on modifying the size of the actor
used as a graphical representation of the elastic.
You will have two instances of the same elastic actor on the scene. Each of
them will connect to a different arm of the slingshot. The behaviors will be
different for each instance; as such, you will edit the instances on the scene.
Also, you will need to access some of the attributes of the scene instances.
 
Search WWH ::




Custom Search