Adam's Lair Forum

game development and casual madness
It is currently 2018/01/23, 11:47

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 2017/07/17, 23:28 
Newbie
Newbie

Joined: 2017/07/17, 21:21
Posts: 2
Role: Hobbyist
Hi.

New to the forums, new to Duality (today's my seventh day of using it). Already loving it - after going through own (doomed) attempts at "engine", FRB and Godot, I believe I've finally found the tool that's really right for me.

So far, the forums, tutorials and all have been very helpful in understanding the mechanics, dispelling doubts and helping get through problems. This is the first issue I seem incapable to dispose of thusly - so here I am!

The problem is best explained with an illustration:

Code:
https://www.youtube.com/watch?v=A2WEaUnu4rs&feature=youtu.be


The moving red circle, moved according to the current MouseWorldPos, is supposed to always be on top of everything. So far, for whatever reason, it had been... but after adding the two mock terrain pieces, one of them continues to stay nicely back - and the other forces itself in front of the mouse-bound object.

I've tried changing Z through Transform. Depending on the Camera's Perspective, it blows everything out of perspective or does nothing.

I've tried toying with the Offset. It can send the terrain piece behind the background, but not set it beneath the mouse object.

I'm pretty sure I'm missing something obvious here... but I can't seem to locate it anyway :rolleyes:

11MB of weight is a little scary given less than .5MB of my own data, but I managed to upload the build as well if it should help in any way:

Code:
https://www.dropbox.com/s/8jwkjn6xy6p6s52/Duality%20Application.zip?dl=0


Thanks in advance ^^

EDIT: Apparently I can't post links, so I had to insert spaces into said urls.
EDIT2: Managed to post 'em in code brackets.


Top
 Profile  
 
PostPosted: 2017/07/18, 18:25 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2037
Location: Germany
Role: Professional
Hey and welcome!

Played around with your project a bit. You can solve the issue by adjusting the Offset of the mouse sprite renderer to -1:

Image

Gfycat Video - Click to Play. [Source]


The reason for the wrong depth ordering before was simply that all of the affected objects shared the same Z coordinate and the same Z offset of zero. As long as that's the case, the order in which the objects are rendered is simply not defined and may end up one way or another, and also being affected by the materials they use and their settings.

Since you mentioned that you had played around with the offsets, I'm not sure why that didn't work before when you tried it - let me know if this keeps to be an issue.

wuzet wrote:
EDIT: Apparently I can't post links, so I had to insert spaces into said urls.
EDIT2: Managed to post 'em in code brackets.

Sorry about that! We've had some problems with bots in the past, and this is one countermeasure to keep them out. You should be able to post links as soon as you've reached a certain post count.

wuzet wrote:
11MB of weight is a little scary given less than .5MB of my own data, but I managed to upload the build as well if it should help in any way:


Pretty clean upload already! If you want to further reduce size, you can also delete all the Duality binaries and plugins that are installed via package, as they'll be re-installed when running the editor. Or just delete the OpenTK stuff, that's usually the biggest dent ^^

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2017/07/18, 21:14 
Newbie
Newbie

Joined: 2017/07/17, 21:21
Posts: 2
Role: Hobbyist
Adam wrote:
You can solve the issue by adjusting the Offset of the mouse sprite renderer to -1:
(...)
Since you mentioned that you had played around with the offsets, I'm not sure why that didn't work before when you tried it - let me know if this keeps to be an issue.


I... I set the offset value for the parent's SpriteRenderer. The one that displays nothing :redface: Applied to the correct sprite it works as a charm, of course.

Adam wrote:
wuzet wrote:
EDIT: Apparently I can't post links, so I had to insert spaces into said urls.
EDIT2: Managed to post 'em in code brackets.

Sorry about that! We've had some problems with bots in the past, and this is one countermeasure to keep them out. You should be able to post links as soon as you've reached a certain post count.


Yeah, who hasn't ^^ I was pretty impressed actually by how resilient the forums were to my attempts at smuggling the links in until I though to try the [ code ] workaround (mwahaha).


Thank you very much for the swift and professional answer! I'll try to make my next question less silly; for now I'm good, and ready to continue my tinkering :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group