|
@@ -1957,6 +1957,11 @@ One interesting feature is the ability to flip/mirror animations on both axes, u
|
|
|
|
|
|
|
|
For a demonstration, check examples 33_Urho2DSpriterAnimation and 24_Urho2DSprite.
|
|
For a demonstration, check examples 33_Urho2DSpriterAnimation and 24_Urho2DSprite.
|
|
|
|
|
|
|
|
|
|
+Tip for naming your files:
|
|
|
|
|
+- if an xml file has the same name as an image file in the same repository, it is assumed that it is a texture parameter file
|
|
|
|
|
+- if an xml file has the same name as a Spriter scml file in the same repository, it is assumed that it is a spritesheet file
|
|
|
|
|
+So to prevent conflicts, scml and image files shouldn't have the exact same name.
|
|
|
|
|
+
|
|
|
\section Urho2D_Particle Particle emitters
|
|
\section Urho2D_Particle Particle emitters
|
|
|
A 2D particle emitter is built from a *.pex file (a format used by many 2D engines).
|
|
A 2D particle emitter is built from a *.pex file (a format used by many 2D engines).
|
|
|
A *.pex file is loaded using ParticleEffect2D class (Resource) and rendered using ParticleEmitter2D class (Drawable component):
|
|
A *.pex file is loaded using ParticleEffect2D class (Resource) and rendered using ParticleEmitter2D class (Drawable component):
|
|
@@ -2040,6 +2045,8 @@ Check Box2D manual - Chapter 4 Collision Module and Chapter 7 Fixtures for full
|
|
|
- Edge shapes <=> CollisionEdge2D: defines 2D physics collision edge. Edge shapes are line segments defined by 2 vertices (\ref CollisionEdge2D::SetVertex1 "SetVertex1()" and \ref CollisionEdge2D::SetVertex2 "SetVertex2()" or globaly \ref CollisionEdge2D::SetVertices "SetVertices()"). They are provided to assist in making a free-form static environment for your game. A major limitation of edge shapes is that they can collide with circles and polygons but not with themselves. The collision algorithms used by Box2D require that at least one of two colliding shapes have volume. Edge shapes have no volume, so edge-edge collision is not possible.
|
|
- Edge shapes <=> CollisionEdge2D: defines 2D physics collision edge. Edge shapes are line segments defined by 2 vertices (\ref CollisionEdge2D::SetVertex1 "SetVertex1()" and \ref CollisionEdge2D::SetVertex2 "SetVertex2()" or globaly \ref CollisionEdge2D::SetVertices "SetVertices()"). They are provided to assist in making a free-form static environment for your game. A major limitation of edge shapes is that they can collide with circles and polygons but not with themselves. The collision algorithms used by Box2D require that at least one of two colliding shapes have volume. Edge shapes have no volume, so edge-edge collision is not possible.
|
|
|
- Chain shapes <=> CollisionChain2D: defines 2D physics collision chain. The chain shape provides an efficient way to connect many edges together (\ref CollisionChain2D::SetVertices "SetVertices()") to construct your static game worlds. You can connect chains together using ghost vertices. Self-intersection of chain shapes is not supported.
|
|
- Chain shapes <=> CollisionChain2D: defines 2D physics collision chain. The chain shape provides an efficient way to connect many edges together (\ref CollisionChain2D::SetVertices "SetVertices()") to construct your static game worlds. You can connect chains together using ghost vertices. Self-intersection of chain shapes is not supported.
|
|
|
|
|
|
|
|
|
|
+Several collision shapes may exist in the same node to create compound shapes. This can be handy to approximate complex or concave shapes.
|
|
|
|
|
+
|
|
|
Important: collision shapes must match your textures in order to be accurate. You can use Tiled's objects to create your shapes (see \ref Urho2D_TMX_Objects "Tile map objects"). Or you can use tools like Physics Body Editor (https://code.google.com/p/box2d-editor/), RUBE (https://www.iforce2d.net/rube/), LevelHelper (http://www.gamedevhelper.com/levelhelper/), PhysicsEditor (http://www.codeandweb.com/physicseditor), ... to help you. Other interesting tool is BisonKick (https://bisonkick.com/app/518195d06927101d38a83b66/).
|
|
Important: collision shapes must match your textures in order to be accurate. You can use Tiled's objects to create your shapes (see \ref Urho2D_TMX_Objects "Tile map objects"). Or you can use tools like Physics Body Editor (https://code.google.com/p/box2d-editor/), RUBE (https://www.iforce2d.net/rube/), LevelHelper (http://www.gamedevhelper.com/levelhelper/), PhysicsEditor (http://www.codeandweb.com/physicseditor), ... to help you. Other interesting tool is BisonKick (https://bisonkick.com/app/518195d06927101d38a83b66/).
|
|
|
|
|
|
|
|
Use \ref PhysicsWorld2D::SetDrawShape "SetDrawShape()" in combination with \ref PhysicsWorld2D::DrawDebugGeometry "DrawDebugGeometry()" to toggle shapes visibility.
|
|
Use \ref PhysicsWorld2D::SetDrawShape "SetDrawShape()" in combination with \ref PhysicsWorld2D::DrawDebugGeometry "DrawDebugGeometry()" to toggle shapes visibility.
|