Object assemblies

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Object assemblies

Postby misho » Thu Mar 27, 2014 3:58 pm

Hello all,

I'd like to create an assembly that consists of multiple objects, and at some point, I'd like to "discard" them... In particular, it is a rocket that discards the stages during the flight.

first question is,

What is the right approach to do this: Create a compound collision, and destroy/re-create when I discard components?

or

Create a linked assembly, and then destroy links to "let go" of the of the components

Second question:

I tried the second approach (linked assembly), it works nicely. However, I find linking unneccessarily complex. Right now, I'm using CreateCustomHinge, then enabling hinge limits, and finally setting hinge limits to 0.

All I need is a completely rigid joint without any degrees of freedom... that should be the most primitive link available. What's the quickest way to set that up?

Misho
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 675
Joined: Tue May 04, 2010 10:13 am

Re: Object assemblies

Postby Julio Jerez » Thu Mar 27, 2014 4:38 pm

you got it right, i fthe assembly does not use too many parts, hinge with the angle set to zero is a solid joint.

using the compound is faster, bu you will have to add some code.
you will need to make a dat strutore that give you infomation of what part make teh different componet of the assembly.

for a game I recomnet the method using the compound but you need add some coding for removing that parts, and making new compounds..
The si teh only way you cn ahave 100% rigdi joints that will not dimember in the present of large discontinue impacts
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Object assemblies

Postby misho » Thu Mar 27, 2014 4:46 pm

Julio Jerez wrote:you got it right, i fthe assembly does not use too many parts, hinge with the angle set to zero is a solid joint.

using the compound is faster, bu you will have to add some code.
you will need to make a dat strutore that give you infomation of what part make teh different componet of the assembly.

for a game I recomnet the method using the compound but you need add some coding for removing that parts, and making new compounds..
The si teh only way you cn ahave 100% rigdi joints that will not dimember in the present of large discontinue impacts


Thanks Julio.

Ok, I will stick to the joint method for now, since the rocket may have less than 10 parts.

To avoid setting angle limits, I was hoping to create a simple fixed joint, by using "CustomCreateBlankJoint" and using DOF set to 0, as in:

stage2Link = CustomCreateBlankJoint(0,stage2Body, stage1Body,0);

but that doesn't work. Can I use something like this?
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 675
Joined: Tue May 04, 2010 10:13 am

Re: Object assemblies

Postby Julio Jerez » Thu Mar 27, 2014 9:10 pm

why dont you make a fix joint by suclassing the costum hinge and and in teh derive method set the angle limit to zero?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Object assemblies

Postby misho » Mon Mar 31, 2014 4:46 pm

Thanks, I did just that, seemed like the easiest approach!

Misho
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 675
Joined: Tue May 04, 2010 10:13 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron