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 / Added limbs are disappearing?

Author
Message
GrumpyOne
18
Years of Service
User Offline
Joined: 27th Nov 2007
Location: London, UK
Posted: 28th Jun 2010 20:28
Dear All,

I'm having a problem with add limbs. I am doing something really simple. I am creating a plane from 8 triangles, creating meshes from the last 7 triangles, and adding them as limbs to the first triangle.

The first bit (creating the objects) works fine, but once I have added the limbs...the final object still consists of the only of first object and all the limbs disappear. Is there something I don't understand? Are limbs added in object centred coordinates or world coordinates. I am assuming the meshes will be added in their current positions but perhaps I am wrong? I've tried removing the delete object and delete mesh commands in the code below but no difference.


I just know this will be a very simple answer!

Best,
Mr Grumpy

GrumpyOne - the natural state of the programmer
GrumpyOne
18
Years of Service
User Offline
Joined: 27th Nov 2007
Location: London, UK
Posted: 29th Jun 2010 13:17
Okay, bizarre.

After adding the limbs I've performed a checklist for limbs DB returns 8. Limbs exist all return yes....but I can't see them. I've even tried pitching my object upside down just in case vertex order has been reversed on the new limbs, but no. DBPro thinks the limbs exist, but they just aren't being shown, or are positioned way out of the screen (the objects the meshes are created from are all adjacent to each other).

I've even gone back to basics and created a new project that just adds triangles together as limbs, in the same way as in the code above...and guess what...that works. I am completely at a loss to explain what is happening.

GrumpyOne - the natural state of the programmer
HowDo
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 29th Jun 2010 13:44 Edited at: 29th Jun 2010 13:45
GrumpyOne do the last part of your code manually, take out the for next loop as this is what is causing your problem.

set them one at a time, then when it looks right workout how to make the for next loop.


this bit
make mesh from object is mesh number first then object number

add limb is then object you are using as the main object that the other bit are added to, limb number is next and this must start at 1 and increment by one each time a limb is added, then the mesh number which can be in any order from those made.

link limb may not be need try doing it with out it.


hope this helps if not say so and will try something else.

Dark Physics makes any hot drink go cold.
GrumpyOne
18
Years of Service
User Offline
Joined: 27th Nov 2007
Location: London, UK
Posted: 29th Jun 2010 14:04
Thanks How Do,

I just solved it. It was bizarre. The vertex order seems to be reversed when I added the triangles as limbs so they couldn't be seen. Also, for some reason the first triangle, that acts as limb 0, becomes double sided. Changing my make triangle code to:



fixes it.

GrumpyOne - the natural state of the programmer
HowDo
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 29th Jun 2010 14:07
give this a try, hide limb zero and see what you get.

Dark Physics makes any hot drink go cold.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 29th Jun 2010 17:49
The problem sounds like a culling issue (haven't run your code, so can't say for certain) meaning that the limbs you are adding are visible from one side, but not the other.

After you have added your limbs, just use the SET OBJECT CULL command with a cull value of 0 to disable the culling.

Unfortunately you can't set the cull mode on individual limbs just yet, but you will be able to in the future when I update my plug-ins.

Login to post a reply

Server time is: 2026-07-25 09:39:06
Your offset time is: 2026-07-25 09:39:06