Is there a way to create a joint where the two attached bodies can't move at all relative to each other?
I suppose I could hack it by trying to supply 0,0 for the axis of a prismatic joint, or combining a prismatic joint with a distance joint... but neither of these are very elegant.
The most rigidity I can get, the better. I may just end up making a work-around...
Fixed joint
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Fixed joint
I'm sure Taehl might be able to help you, or you could try looking at his code I guess. He's been working on a game based around plant growth. It works with joints, similar to what you're looking for.
http://love2d.org/forums/viewtopic.php?f=5&t=2244
http://love2d.org/forums/viewtopic.php?f=5&t=2244
@rynesaur
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Fixed joint
@Ryne: I don't think those plants use physics…
Or a PrismaticJoint and a RevoluteJoint? They are each other's complement, so I think it is less hackish than the other ways, albeit far from elegant.Araqiel wrote:Is there a way to create a joint where the two attached bodies can't move at all relative to each other?
I suppose I could hack it by trying to supply 0,0 for the axis of a prismatic joint, or combining a prismatic joint with a distance joint... but neither of these are very elegant.
Last edited by Robin on Sat Dec 18, 2010 8:56 am, edited 1 time in total.
Help us help you: attach a .love.
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: Fixed joint
Nope, my plants are physics-less. At about 200 pieces per plant, Box2D probably wouldn't be able to keep up, anyway.
As far as a physics-based solution for that... Hm. Well, I haven't used the physics engine much, but couldn't you just attach both of the objects to a rectangle which is invisible and doesn't collide with anything?
As far as a physics-based solution for that... Hm. Well, I haven't used the physics engine much, but couldn't you just attach both of the objects to a rectangle which is invisible and doesn't collide with anything?
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Fixed joint
Then the problem remains, doesn't it?Taehl wrote:As far as a physics-based solution for that... Hm. Well, I haven't used the physics engine much, but couldn't you just attach both of the objects to a rectangle which is invisible and doesn't collide with anything?
Instead of object a <-> object b, you suggest doing object a <-> rectangle <-> object b, where "<->" is a way of jointing together two things without allowing any —
Wait. Wait a minute.
Araqiel: two attached bodies you say? Do they have to split apart at one point? If not, why not use a single body? You can attach more than one shape to a body, IIRC.
Help us help you: attach a .love.
Re: Fixed joint
Yeah, I finally decided that it'd work to use one body and multiple collision shapes. When they need to split, just break that piece off into its own body.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot], keharriso and 78 guests