User Tools

Site Tools


en:tutorials:useparentspace_for_spawners

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:tutorials:useparentspace_for_spawners [2019/06/13 11:44 (12 months ago)]
sausage
en:tutorials:useparentspace_for_spawners [2019/06/14 01:48 (12 months ago)] (current)
Line 10: Line 10:
 ===== Objects and Spawners ===== ===== Objects and Spawners =====
  
-In general when specifying what object to spawn, the object is given screen ​co-ordinates like:+In general when specifying what object to spawn, the object is given co-ordinates ​in world space like:
  
     Position = (35, 100, 0.0)     Position = (35, 100, 0.0)
Line 24: Line 24:
 It is the Object to Spawn, that will use the ''​UseParentSpace''​ property. It is the Object to Spawn, that will use the ''​UseParentSpace''​ property.
  
-But before we get there, let's set up a spawner in the usual screen coordinate ​way.+But before we get there, let's set up a spawner in the usual way using world coordinates.
  
  
Line 63: Line 63:
 ActiveObject ​    = 1000 ActiveObject ​    = 1000
 WaveSize ​        = 5 WaveSize ​        = 5
-WaveDelay ​       = 0.005 ~ 0.03+WaveDelay ​       = 0.016 ~ 0.03
 ObjectSpeed ​     = (0, 800) ObjectSpeed ​     = (0, 800)
 Rotation ​        = 22.5 Rotation ​        = 22.5
Line 79: Line 79:
 LifeTime ​      = 1.0 LifeTime ​      = 1.0
 Smoothing ​     = true Smoothing ​     = true
-Position ​      = (-0.3, 00.0, 0.0) ~ (0.45, 00.0, 0.5) +Position ​      = (-50.0, 00.0, 0.0) ~ (90.0, 00.0, 0.5)
-UseParentSpace = both+
 </​code>​ </​code>​
  
-In the spawner config above, we're making ''​RainSpawner''​ spawn ''​RainDrop''​ objects, lots of them, in a fast down direction, but rotating the spawner by 22 degrees (plus using relative speed) to get a nice down right direction for the rain.+In the spawner config above, we're making ''​RainSpawner''​ spawn ''​RainDrop''​ objects, lots of them, in a fast down direction, but rotating the spawner by 22 degrees (plus using relative speed) to get a nice down-left direction for the rain.
  
-For the ''​RainDrop''​ objects themselves, we vary their alpha transparency,​ stretched size and their starting position on screen between X = -50.0 to 90.+For the ''​RainDrop''​ objects themselves, we vary their alpha transparency,​ stretched size and their starting position on screen between X = -50.0 to 90.0.
  
 There is no image for the raindrops, we're just using a stretched pixel. That will do nicely. ​ There is no image for the raindrops, we're just using a stretched pixel. That will do nicely. ​
Line 94: Line 93:
 ===== Relative Spawner Positioning ===== ===== Relative Spawner Positioning =====
  
-The last step is to convert the positioning to be relative to the Cloud'​s size. This means changing the ''​Position''​ property of the ''​RainDrop''​ and setting ''​UseParentSpace''​ to both:+The last step is to convert the positioning to be relative to the Cloud'​s size. This means changing the ''​Position''​ property of the ''​RainDrop''​ and setting ''​UseParentSpace''​ to position:
  
 <code ini> <code ini>
Line 100: Line 99:
 Graphic ​       = @ Graphic ​       = @
 Texture ​       = pixel Texture ​       = pixel
-Size           = (1,20) ~ (1,40)+Scale          ​= (1,20) ~ (1,40)
 Alpha          = 0.3 ~ 0.8 Alpha          = 0.3 ~ 0.8
 Color          = (255,​255,​255) Color          = (255,​255,​255)
Line 109: Line 108:
 Smoothing ​     = true Smoothing ​     = true
 Rotation ​      = 22.5 Rotation ​      = 22.5
-Position ​      = (-0.3, 00.0, 0.0) ~ (0.45, 00.0, 0.5) +Position ​      = (-0.3, 0.0, 0.0) ~ (0.45, 0.0, 0.5) 
-UseParentSpace = both+UseParentSpace = position
 </​code> ​ </​code> ​
  
Line 118: Line 117:
  
 {{ :​tutorials:​raining.png?​nolink |}} {{ :​tutorials:​raining.png?​nolink |}}
 +
 +
 +==== Further information ====
 +  - Ordered List Item[[en:​tutorials:​useparentspace|UseParentSpace for Relative Object Positioning and Scaling]]
 +  - [[en:​orx:​config:​settings_structure:​orxobject|Object Configuration]]
  
en/tutorials/useparentspace_for_spawners.1560426243.txt.gz · Last modified: 2019/06/13 14:44 (12 months ago) (external edit)