Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Setting object Depth to be the first to show

Author
Message
haliop_New
User Banned
Posted: 5th Jan 2017 12:30
how ?

meaning,
in my game i created a 3d object which is the "Touch To Play" object.
the game runs always behind it however
i locked the object infront of the camera
and now sometimes i can see other objects interfere with the Touch to play object which obviously i want it to be the first thing the players sees no matter what hapeens in the 3d world.
so , i tried using SetObjectDepth functions but with no success .
all i want is to make the object as the first object the players sees so this object should override all other objects no matter the other object locations in the 3d space .
can this be done ?


thank you for your time , haliop.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 5th Jan 2017 17:22
SetObjectDepthRange(ID,0,0) might work. Alternatively you could turn off depth testing and draw the object after everything else by using the Update(), Render(), DrawObject(ID), Swap() sequence.
haliop_New
User Banned
Posted: 6th Jan 2017 00:53
first solution helps but not 100 percent...
second solution works perfect.
cant wait to show off my new game

thanks Paul.

Login to post a reply

Server time is: 2024-11-17 15:02:53
Your offset time is: 2024-11-17 15:02:53