[ODE] Sphere to Cube?
Hampus
hampus at sxp.se
Thu Sep 14 01:21:37 MST 2006
Hi David,
This is just an idea. Not sure if it is applicable to your situation.
How about fading in the cube by size (start small and increase it
over time to the desired size) over a couple for frames to let the
objects around it adjust naturally to the new shape.
Cheers,
Hampa
http://www.toribash.com
14 sep 2006 kl. 09.01 skrev David Perry:
>
> Thanks, getting it to change from a cube/sphere is working.
>
> As was stated though, I'm getting the cube penetrating objects that
> the sphere wasn't on creation.
>
> I'm unsure on how to detect the depth of penetration and move the
> cube by this amount, any pointers please?
>
> Thanks in advance.
>
>
>
> > Date: Tue, 12 Sep 2006 10:33:38 -0700
> > From: hplus-ode at mindcontrol.org
> > To: tias_dp at hotmail.com
> > CC: ode at q12.org
> > Subject: Re: [ODE] Sphere to Cube?
> >
> > The easiest thing to do is to remove the sphere geom from the
> body and
> > destroy it, and create a new geom that's a cube and attach that
> to the
> > body. You probably want the cube to be sized so it has identical
> volume
> > to the sphere.
> >
> > However, depending on how the sphere interacts with the world,
> the cube
> > may be significantly penetrating something where the sphere
> isn't, which
> > would generate a huge penalty force. You could possibly fix this
> up by
> > running collision detection for the new cube only, and moving the
> object
> > by the depth of detected penetration as a one-time thing, if any.
> It's
> > not guaranteed that there will be a solution, however.
> >
> > Cheers,
> >
> > / h+
> >
> >
> > David Perry wrote:
> > > Hi.
> > >
> > > I've created a sphere and have it rolling around my world quite
> happily.
> > >
> > > What I'm wanting to do is read a keypress and convert this
> sphere to a
> > > cube (or if it's already been converted to a cube, convert it
> back to
> > > a sphere).
> > >
> > > The problem is I want it to have all the attributes that the
> previous
> > > shape did ie. mass, rotation, velocity etc.
> > >
> > > Is this even possible? I've tried looking online for an answer
> but I'm
> > > not really sure what I should be looking for exactly.
> > >
> > > Thanks in advance.
> > >
> > >
> ----------------------------------------------------------------------
> --
> > > Be one of the first to try Windows Live Mail.
> > > <http://ideas.live.com/programpage.aspx?versionId=5d21c51a-
> b161-4314-9b0e-4911fb2b2e6d>
> > >
> > >
> ----------------------------------------------------------------------
> --
> > >
> > > _______________________________________________
> > > ODE mailing list
> > > ODE at q12.org
> > > http://q12.org/mailman/listinfo/ode
> > >
>
> Be one of the first to try Windows Live Mail.
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
More information about the ODE
mailing list