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.

DarkBASIC Professional Discussion / Curious little issue - Gun Vanishes at certain angles

Author
Message
MASTER OF PUPPETS
22
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 28th Jul 2010 01:45
I do not understand why the "gun" vanishes for no reason. I've included the code. You can set the "TOPVIEW#" variable to 1 or 0 to see that in 1st person the "gun" vanishes but in birds eye view it's fine. I guess I don't get it...

P.S. I forgot how to do the little "code snippet" thing, sorry.
I will attach the example code tho...

metal is not music but a way of life...all hail to the reigning king METALLICA!!!
Morcilla
23
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 28th Jul 2010 11:28
I bet it is because the Offset Limb function for the gun model:



Large offsets cause the objects to vanish at certain camera angles.
It must be due to some auto-culling frustrum or something like that. As the center of the object is still at the original position (only the limb is displaced), the engine thinks at some point that the object is not visible, and then hides it.
Anyway it is quite annoying, it would be nice to have this issue addressed.

I've tried to workaround this by using:

- SET OBJECT FRAME
- SET OBJECT RADIUS
- CALCULATE OBJECT BOUNDS

But no success so far
Only solution I've found is to move the whole object, without offsetting the limbs. Once again...

If anyone has found the right way to largely offset limbs, please post how

MASTER OF PUPPETS
22
Years of Service
User Offline
Joined: 9th Jun 2004
Location: Trapped Under Ice
Posted: 28th Jul 2010 11:59 Edited at: 28th Jul 2010 12:27
haha great!
so i finally find a way to keep a "gun" on the screen and POP!!!!
bursting my damn bubble (as they say).

Is there some way to exclude objects from the culling process?
set object cull 1,0 doesn't seem to do anything.

...stop the presses...i just looked up "cull" in the forums and one of the workarounds that you mentioned seems to work...

right before the "DO" on the main loop i put "SET OBJECT RADIUS 1,-1" and that worked.

too bad it doesn't work for you though, sorry to hear that, and thank you for your input.

P.S. it also works in my case by entering...
SET OBJECT FRAME 1,0,3 (the 3 recalculates the bounds value(according to the DBP help file))

metal is not music but a way of life...all hail to the reigning king METALLICA!!!
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Jul 2010 13:15
@ Morcilla

You're on the right track

I had this problem with my project not too long ago, what you need to do is the following:

set object radius 1,-1

TheComet

Morcilla
23
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 28th Jul 2010 17:32
Great then, glad it works.
I should give it another try

Login to post a reply

Server time is: 2026-07-26 01:26:21
Your offset time is: 2026-07-26 01:26:21