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.

Dark GDK / How do i flip object mesh?

Author
Message
petur
15
Years of Service
User Offline
Joined: 13th Jul 2009
Location:
Posted: 13th Jul 2009 13:40
Hi

I created a new cylinder:
dbMakeObjectCylinder( 1, 10 );

My game happens inside the cylinder (using it as a "box" around my gameworld) however! i cannot see the walls once i'm inside it.

Is there a way i can flip the mesh, so it can be seen from the inside?
Potassium
15
Years of Service
User Offline
Joined: 12th Jul 2009
Location:
Posted: 13th Jul 2009 20:01
I think you just scale the object negatively so that its normals face out.

heres the documentation for dbScaleObject();



==============

If you want toscale the object inside-out, scale neagtive.

Example:
if you want to scale an object -100x:



Hopefully that helps.
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 14th Jul 2009 07:05
That is always not a good idea, yes it will work but there will be cases were things will not appear correctly. The best bet is to either reverse the normals or simply draw backfaces. CullNone.
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 14th Jul 2009 07:59
If you're using shaders you can just reverse the cull order rather than remove backface culling altogether, that coupled with negative scaling it on any given axis will flip it.

Login to post a reply

Server time is: 2024-10-01 08:16:56
Your offset time is: 2024-10-01 08:16:56