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 / Sprite on 3D object

Author
Message
ICERGB
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 23rd Oct 2016 12:23
Nobody seems to be talking about this so I am guessing the answer is well known...
Just for clarification...

If I am using 3d objects on the screen, can I position a sprite on top of it?
My sprite disappears all the time.


BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 23rd Oct 2016 13:28 Edited at: 23rd Oct 2016 13:29
Is this what you need?

SetGlobal3DDepth

Sets the position of all 3D objects relative to 2D objects. For example using a global 3D depth of 100 would mean that all sprites at a depth less than or equal to 100 would appear above any 3D objects whilst sprites at a depth greater than 100 would appear below any 3D objects.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
ICERGB
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 23rd Oct 2016 13:50 Edited at: 23rd Oct 2016 13:54
Sorry, Seems to be only a problem with the sprite I am trying to create?

ICERGB
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 24th Oct 2016 01:51 Edited at: 24th Oct 2016 01:54
ok sorry for the above snippet; didn't take into consideration the width and height of the second values because I was used to Dark Basic
But please see the code below and tell me what is wrong???


ICERGB
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 24th Oct 2016 05:31
ok for what I can figure out...

Don't use sync() Drawwhatever sync()
use

swap() drawwhatever render()

Note: I am not using the createrenderimage command for testing purposes only

when you make the sprite out of the image the sprite needs to be resized to what the original image was...
ICERGB
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 24th Oct 2016 13:55 Edited at: 24th Oct 2016 14:03
FYI some of the draw examples dont work anymore


this seems to work now:


Login to post a reply

Server time is: 2024-11-25 01:50:01
Your offset time is: 2024-11-25 01:50:01