Page 1 of 1

iPod touch controls, comes into a problem.

PostPosted: Sat Mar 10, 2012 11:39 am
by AltruismIsDead
Image

Alright, here's the basic layout of what I have so far, to help understand the problem a bit more, I'll explain whats been done so far.

- I have the 4 controls, Left Arrow, Right Arrow (left side) and 2 Attack buttons (right side).
- They are at close to near full Z Depth, I also have Full Canvas layouts covering the buttons, all at close to full Z Depth. Now the problem comes in.
- My main player "Zombie" is in the middle of Z Depth, so he appears in front of objects behind him, and in back of objects in front of him.

Now the problem I am facing is when the touch controls come into contact with both the Fire Hydrant (foreground object) AND the Stop sign (foreground object) both the arrows, and the filled canvas go behind them, so you can no longer use them since they are hidden.

I have set the Z Depth for both these objects to be BEHIND the controls and the filled region canvas, but yet they still appear in front of them?? (As shown in the picture example)

I don't understand why they are obstructing the view, and also if any coding would be necessary to prevent this from happening? I am hoping this is a bug on my behalf and not a constraint on Game Editor. Any help would be greatly appreciated.

Re: iPod touch controls, comes into a problem.

PostPosted: Sat Mar 10, 2012 11:49 am
by skydereign
This probably has to do with you parenting the controls to the view. If you are going to parent hud elements to the view than set the view's zdepth to the highest. I would recommend you do this anyways, as its the best way to handle hud elements. So, any actor parented to another actor shares several things. Some of them are transp, visibility state, rgb, xy (relative change), zdepth, and perhaps a few more.

Re: iPod touch controls, comes into a problem.

PostPosted: Sat Mar 10, 2012 12:11 pm
by AltruismIsDead
Yeah, I have the view set to the highest zdepth, I just am racking my brains out over what should be an easy fix.... I'll try a couple other things, but if you're on the chat room I'll link you the file to see if you can notice any mistakes being made

Re: iPod touch controls, comes into a problem.

PostPosted: Sat Mar 10, 2012 3:29 pm
by AltruismIsDead
Sorry for the double post, but huge thanks to Phyzix for helping me out with this dilemma.

How do programmers make it so easy? :lol:

Re: iPod touch controls, comes into a problem.

PostPosted: Sat Mar 10, 2012 4:31 pm
by Hblade
AltruismIsDead wrote:How do programmers make it so easy? :lol:

Haha, good question. but in actuality, it isn't easy to them. Some things are incredibly hard to programmers, (i'm not a programmer, I just know a bit of code), but a programmer finds fun in the challenge, therefor they are motivated to solve it. At the same time, make it look neat, by keeping Simplicity, and functionality.

Re: iPod touch controls, comes into a problem.

PostPosted: Sat Mar 10, 2012 4:31 pm
by SuperSonic
'Cus we understand the computer mind xD

Re: iPod touch controls, comes into a problem.

PostPosted: Sat Mar 10, 2012 4:33 pm
by Hblade
xD Indeed

Re: iPod touch controls, comes into a problem.

PostPosted: Sat Mar 10, 2012 9:10 pm
by SuperSonic
But seriously, people who code a lot learn to understand the inner workings of the computer. At least, that's how I see it ^^

Re: iPod touch controls, comes into a problem.

PostPosted: Mon Mar 12, 2012 12:12 pm
by Game A Gogo
How can you program if you don't know how your code will be interpreted by the computer! :P

Re: iPod touch controls, comes into a problem.

PostPosted: Mon Mar 12, 2012 12:31 pm
by SuperSonic
Exactly Gogo :D