on 27-03-2012 09:46 PM
I'm drawing some debug info using the code from the examples, such as:
GameScene.AdHocDraw += () =>
{
Director.Instance.GL.ModelMatrix.Push();
Director.Instance.GL.ModelMatrix.SetIdentity();//g o in world space
Director.Instance.GL.SetBlendMode(BlendMode.Normal );
Director.Instance.SpriteRenderer.DefaultFontShader .SetColor(ref Colors.Yellow);
Director.Instance.SpriteRenderer.DrawTextDebug(
GetDebugInfo(),
GameScene.LocalToWorld(new Vector2(100f, 100f)),
GameScene.Camera2D.GetPixelSize() * EmbeddedDebugFontData.CharSizei.Y
);
Director.Instance.GL.ModelMatrix.Pop();
};The problem that I have is that the debug text is drawn below all other graphics so I can't see it.
I've tried setting the VertexZ on all my sprites but I can't get them lower than than the debug text. Anyone know how to fix this?
Thanks
Solved! Go to Solution.
on 29-03-2012 04:29 PM
Hi YstafYakuza,
A simple way that you can get around these ordering issues that you are seeing is to adjust the order of the Node's which are appearing on top of the text.
scene.AddChild( sprite, -1 );
The -1 will result in the sprite being drawn on the bottom, and hence underneath the debug text. I appreciate that this may not be the best of solutions, but I will enquire as to whether there are any alternative options that you can try.
Thanks
James
on 29-03-2012 05:01 PM
Thanks for helping.
How is that different from setting Sprite.VertexZ to -1? I would have thought that I was basically doing the same thing already.
on 04-04-2012 06:02 PM
PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.
フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと
PSM DevPortalを一度ログアウトし、再度ログインしてください。


Website ©2013 Sony Computer Entertainment Europe
All content, game titles, trade names and/or trade dress, trademarks, artwork and associated imagery are trademarks and/or copyright material of their respective owners. All rights reserved. [more info]
%%http://community.eu.playstation.com/t5/Announcements/Beta-Trial-Information/td-p/11386362
best_shooter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_driver.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_performer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_footballer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_fighter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_creator.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_action_player.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
dev2.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Producer-and-Developer-Ranks/td-p/18407352
trophy.gif%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/The-Community-Awards-FAQ/td-p/18407096
PSlogoSM.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Online-Support-Coordinator-rank/td-p/18414870