0
\$\begingroup\$

Im trying to connect bodies together to make some sort of a "building" system or more specifically im trying to make multiple "blocks" connect to eachother but Struggling to figure out what's the best method to do it I tried using joints (created a jointDef and a joint) but I have no idea how. I can make a single large body but I want different parts of the body to have different friction values

\$\endgroup\$
4
  • \$\begingroup\$ Can you edit to include an example of what you're specifically trying to implement? Just saying that it's a "building" system is vague - what are you trying to build? \$\endgroup\$ Commented Jun 5, 2024 at 17:05
  • \$\begingroup\$ Thanks for pointing it out i edited it \$\endgroup\$ Commented Jun 6, 2024 at 20:53
  • \$\begingroup\$ It would help if you describe what it is you're building, or what criteria it should fulfill. Building a dwelling in the Sims, a bridge or tower in World of Goo, a rollercoaster in a Tycoon game, a siege weapon in Besiege, and a spaceship in Kerbal Space Program will all have different considerations. When you say you "tried using joints", what code did you write specifically, and where did you get stuck, or get a resulting behaviour that differed from what you wanted? \$\endgroup\$ Commented Jun 6, 2024 at 21:03
  • \$\begingroup\$ Well im not making something specific the whole point of what im making is for people to have the creative freedom to make whatever they like \$\endgroup\$ Commented Jun 7, 2024 at 5:31

1 Answer 1

1
\$\begingroup\$

In Box2D friction is set on Fixtures not the Body, so if you simply want a Body with parts that have different friction you can construct a Body with many Fixtures.

\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.