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 / How to put 3d object between the sprites (using kind of sprite's depth)?

Author
Message
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 22nd Sep 2015 19:26
Is this possible to put 3d object between the sprites (using kind of sprite's depth)?
Thanks.
haliop_New
User Banned
Posted: 22nd Sep 2015 19:39
first thing comes to mind is that you can render to image that object and then use that image in the a new Sprite with the correct depth.. but i warn you it might consume some FPS and also may not look best ...
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 22nd Sep 2015 23:55 Edited at: 23rd Sep 2015 15:15
You can use the SetGlobal3DDepth() command:



I've not used the command before so I don't really know much more than this but I'm guessing it sets the depth for all 3D objects so I'd assume you could not have a sprite appear between two different 3D objects.

Invaders of the 29th Dimension - available now on Google Play
Find me on indieDB
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 23rd Sep 2015 13:34
Thanks guys! I hope SetGlobal3DDepth will work for me. Render to image is a bit slow.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 23rd Sep 2015 14:01
Global 3D Depth is the way to go, but on a secondary issue, RenderToImage should not be slow. I am running a full screen render at 2000FPS.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 23rd Sep 2015 15:13 Edited at: 23rd Sep 2015 15:47
Thank you guys, but the best way is to have:

SetObjectToSpriteDepth(objnum, 100)

I don't think is too hard to include it into the AGK...

Login to post a reply

Server time is: 2024-09-29 05:19:31
Your offset time is: 2024-09-29 05:19:31