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 / Disable an objects zdepth?

Author
Message
DARKHALO2K
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: UK
Posted: 22nd Dec 2013 12:33 Edited at: 22nd Dec 2013 12:34
Hi,

Does anyone know of a way to disable a 3D objects zdepth?

I'm working on an FPS in AppGameKit Basic and I've positioned a weapon within the players view but it's clipping through everything.

I've tried working with the depth read and write commands but to no avail.

I'd be grateful for a solution as I'd rather not have to use plain/plane objects.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 22nd Dec 2013 13:01
maybe this help you
SetObjectCullMode
SetObjectDepthReadMode
SetObjectDepthWrite

AGK 108 B19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
DARKHALO2K
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: UK
Posted: 22nd Dec 2013 13:50 Edited at: 22nd Dec 2013 13:59
I've tried using those commands but they didn't have the desired effect.

I've also tried scaling the model down but this caused clipping issues with the camera, and wouldn't work in all situations (as a rocket launcher would stretch out beyond a pistol, for example).

Thanks anyway.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 22nd Dec 2013 14:03
hmm, can you attach a screenshot or a example?

AGK 108 B19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
DARKHALO2K
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: UK
Posted: 22nd Dec 2013 18:11 Edited at: 22nd Dec 2013 18:18
Sure!

Looking up, you can see the players weapon as it should be :



However, looking down, the model clips through the scenery :



In DBC and DBP I would simply disable the objects zdepth, but it seems there is no command for this in AGK. I altered the objects order with SetObjectDepthReadMode but no value seemed to prevent clipping.

I would like to stick with a model for various reasons, but feel I may have to bite the bullet and use a plain object instead.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 22nd Dec 2013 20:03
hmmm, seems your weapon have the wrong scale.
looks like it touch the ground.
maybe try 1 unit = 1 meter.
compare with a 1x1x1 meter cube.
or look from third person (from side) not first person to
find if it is correct.

AGK 108 B19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
DARKHALO2K
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: UK
Posted: 22nd Dec 2013 21:32
As stated, I had tried altering the scale of the model, but this resulted in issues with positioning and camera clipping.

I have since experimented with up scaling everything else (player variables, map size, etc) and have found that this doesn't actually have an effect on performance, so I'll go with that as a fix.

Thanks for having taken the time to look at this though. Much appreciated!
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 22nd Dec 2013 23:20
if the scale is correct
maybe its possible your ground have only two triangles.
did you tryed a mesh with a better grid?

AGK 108 B19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 23rd Dec 2013 00:25
Z depth disabling does not work in agk and is supposed to be added in agk 2.

I have bin waiting for it since I started eat drink slay.

Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 23rd Dec 2013 20:02 Edited at: 23rd Dec 2013 20:05
screenshot
i change the FOV (SetCameraFOV) a little bit too.



AGK 108 B19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670

Attachments

Login to view attachments
DARKHALO2K
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: UK
Posted: 23rd Dec 2013 22:13
Thanks for the info, Cliff.

Login to post a reply

Server time is: 2024-11-24 23:52:42
Your offset time is: 2024-11-24 23:52:42