Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: eborr on August 05, 2009, 08:50:02 PM
-
I have dynamically created 3 entities, each of which will store an image, one of the images is a background, the other 2 should show in the foreground.
I am struggling to get the images to appear in the correct order, EG the background down first and then the other two on top. However the ordering of the images changes if I vary the X co-ordinate of the background
// background entity
//foreground
Any ideas, I am aware that I could solve the problem be creating nodes in scenes, however this is code that I want to re-use
-
Scene.CreateEntity() creates a "free" entity. These entities are sorted by their Y position on screen.
If you want to reproduce adding nodes in SceneEdit, use the AddEntity() method of scene layers.
-
thank you, in these circumstances then answer I think is a combination of CreateEntity and AddEntity, I have worked out a solution by creating a background node in the scene editor, maybe not the most elegant, but it works
-
Using these methods you can programatically do pretty much anything you can do manually in SceneEdit. Except adding a new waypoint group, that is.