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 / Combining multiple objects into one.

Author
Message
Satchmo
21
Years of Service
User Offline
Joined: 29th May 2005
Location:
Posted: 29th Oct 2010 04:29
So, if I wanted to combine several cubes lets say into a single object, what would I have to do?

Here is my object creation code:




The object being instanced is a cube, if that helps.

C0wbox
20
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 29th Oct 2010 05:55
@ Satchmo
Does it need to be 1 object or just handled via 1 object?

Because if its the latter you could just glue them.

If its the former, you can probably add the objects as limbs of an object or combine them as a mesh somehow.

If you need any more explanation than that, we'll need to know precisely how you want them joined.

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th Oct 2010 14:11
If you are using sparky's collision (I see you are) you will have to use the mesh to limb option and sc_setupobject afterwards. Glued objects positions are given relative to the limb they are glued to.

Satchmo
21
Years of Service
User Offline
Joined: 29th May 2005
Location:
Posted: 29th Oct 2010 19:56
I need to have them all be one object, due to speed problems, not just glued.

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 29th Oct 2010 19:59
How will joining them increase speed?

Satchmo
21
Years of Service
User Offline
Joined: 29th May 2005
Location:
Posted: 29th Oct 2010 20:29
dbp has problems dealing with large object counts.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 30th Oct 2010 00:34 Edited at: 30th Oct 2010 00:35
They way I solved this was to first create a core object, add all of the other objects to the core object as limbs, and then create the object again from a mesh. This will cause the resulting object to have no limbs at all, and be completely fused together:



TheComet

Satchmo
21
Years of Service
User Offline
Joined: 29th May 2005
Location:
Posted: 30th Oct 2010 01:51
w00t, works perfectly thank you.

Login to post a reply

Server time is: 2026-07-22 04:37:56
Your offset time is: 2026-07-22 04:37:56