Page 2 of 2
Re: Several Questions
Posted: Sat Oct 02, 2010 2:48 pm
by lareusoular
Ah, and just one more thing:
how can I do a TriangleMesh here?
I have created a TriangleMesh, but I don't know how to make it an entity... searching....
EDIT: How can I make a Dynamic Triangle Group? Static isn't usefull...
Re: Several Questions
Posted: Sat Oct 02, 2010 3:53 pm
by Norbo
Currently, the best option is a CompoundBody. Using lots of bodies in a single compound body should be avoided if possible, so if you can, making the shape out of a combination of fewer, simpler convex shapes like ConvexHulls or other primitives would work better.
v0.15.0 includes some significant redesigns that make dynamic triangle meshes more feasible. If they aren't included in v0.15.0, they'll be in the following version.
Re: Several Questions
Posted: Sat Oct 02, 2010 4:28 pm
by lareusoular
Norbo wrote:Currently, the best option is a CompoundBody. Using lots of bodies in a single compound body should be avoided if possible, so if you can, making the shape out of a combination of fewer, simpler convex shapes like ConvexHulls or other primitives would work better.
v0.15.0 includes some significant redesigns that make dynamic triangle meshes more feasible. If they aren't included in v0.15.0, they'll be in the following version.
Ok, it works, but if I make a more complicated Model, it doesn't... Is there a way to make a concave mesh?
Re: Several Questions
Posted: Sat Oct 02, 2010 4:48 pm
by Norbo
The CompoundBody is just a combination of other Entities. It lets you make concave shapes from other convex ones, including triangles.
Re: Several Questions
Posted: Sun Oct 03, 2010 5:18 pm
by lareusoular
Norbo wrote:The CompoundBody is just a combination of other Entities. It lets you make concave shapes from other convex ones, including triangles.
ok,
but, there's another problem:
I made a PhysicCamera class. I put it in my editor, it falls and collide with the ground

, but there is a problem. If I apply a Velocity, the Box(i'm using a box for the camera collision, with heigh 5, width and lenght 1), the object falls some 4 units, and rotate a little... What is happening?
I use:
public Vector3 Velocity
{
set { Box.Entity.ApplyLinearImpulse(value); }
}
What is going on?
Re: Several Questions
Posted: Sun Oct 03, 2010 6:44 pm
by Norbo
Dynamic objects are expected to undergo some angular motion when they collide, depending on the collision. An entity cannot change its angular momentum unless there is some external application of force, so it has to be coming from somewhere.
If you want to prevent something from rotating completely, one option is to set its LocalInertiaTensorInverse to Toolbox.ZeroMatrix. This has the effect of giving the entity infinite inertia and no force can change its orientation.
Note that you can set Velocity properties directly, and that using ApplyLinearImpulse doesn't directly change velocity- it changes momentum, which is a scaling factor (mass) different from velocity. If your object's mass is something other than 1, a linear impulse is not equivalent to a direct change in velocity.
Re: Several Questions
Posted: Sun Oct 03, 2010 7:30 pm
by lareusoular
So, now I'm using:
public Vector3 Velocity
{
set
{
Box.Entity.LinearVelocity = value;
}
}
It works, but when I use it, the gravity gets strange(the gravity seems to be 0,01, the object falls REALLY slow....)... Without changing it, the object falls fast....
Re: Several Questions
Posted: Sun Oct 03, 2010 7:35 pm
by lareusoular
lareusoular wrote:So, now I'm using:
public Vector3 Velocity
{
set
{
Box.Entity.LinearVelocity = value;
}
}
It works, but when I use it, the gravity gets strange(the gravity seems to be 0,01, the object falls REALLY slow....)... Without changing it, the object falls fast....
Forget it, it was just a problem with my Visual Script Editor... ok?
Re: Several Questions
Posted: Mon Oct 04, 2010 12:24 am
by lareusoular
Re: Several Questions
Posted: Mon Oct 04, 2010 5:48 pm
by Norbo
Looking good

Re: Several Questions
Posted: Wed Oct 06, 2010 5:53 pm
by lareusoular
Norbo wrote:Looking good

Thanks