<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: How to make a Weld Joint in Box2D in Javascript	</title>
	<atom:link href="https://www.binarytides.com/weld-joint-box2d-javascript/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.binarytides.com/weld-joint-box2d-javascript/</link>
	<description>News, Technology, Entertainment and more</description>
	<lastBuildDate>Fri, 13 Jan 2023 07:15:51 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>
		By: t tv		</title>
		<link>https://www.binarytides.com/weld-joint-box2d-javascript/comment-page-1/#comment-65403</link>

		<dc:creator><![CDATA[t tv]]></dc:creator>
		<pubDate>Fri, 17 May 2013 09:10:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.browserspace.com/?p=4188#comment-65403</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/weld-joint-box2d-javascript/comment-page-1/#comment-65402&quot;&gt;Silver Moon&lt;/a&gt;.

sent u the example code to your mail id. I dint find a way to attach it here.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/weld-joint-box2d-javascript/comment-page-1/#comment-65402">Silver Moon</a>.</p>
<p>sent u the example code to your mail id. I dint find a way to attach it here.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Silver Moon		</title>
		<link>https://www.binarytides.com/weld-joint-box2d-javascript/comment-page-1/#comment-65402</link>

		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Thu, 16 May 2013 11:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.browserspace.com/?p=4188#comment-65402</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/weld-joint-box2d-javascript/comment-page-1/#comment-65401&quot;&gt;t tv&lt;/a&gt;.

I created weld joint by setting the individual properties of b2WeldJointDef object.

//connect the centers - center in local coordinate - relative to body is 0,0
joint_def.localAnchorA = new b2Vec2(-0.5, -0.5);
joint_def.localAnchorB = new b2Vec2(0.5, 0.5);

//difference in angle of each body
joint_def.referenceAngle = 0 * Math.PI / 3;

I have not tried the &quot;Initialize&quot; method and am not sure how exactly is it supposed to work.
Can you try using the other method, that is by setting localAnchorA, localAnchorB and referenceAngle properties.

Smudging is fine if the local anchors are inside the boundaries of the object. In the above shown example the 4 small squares are overlapping with the large circle.

Need to see your full code, or a live demo to check the issues.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/weld-joint-box2d-javascript/comment-page-1/#comment-65401">t tv</a>.</p>
<p>I created weld joint by setting the individual properties of b2WeldJointDef object.</p>
<p>//connect the centers &#8211; center in local coordinate &#8211; relative to body is 0,0<br />
joint_def.localAnchorA = new b2Vec2(-0.5, -0.5);<br />
joint_def.localAnchorB = new b2Vec2(0.5, 0.5);</p>
<p>//difference in angle of each body<br />
joint_def.referenceAngle = 0 * Math.PI / 3;</p>
<p>I have not tried the &#8220;Initialize&#8221; method and am not sure how exactly is it supposed to work.<br />
Can you try using the other method, that is by setting localAnchorA, localAnchorB and referenceAngle properties.</p>
<p>Smudging is fine if the local anchors are inside the boundaries of the object. In the above shown example the 4 small squares are overlapping with the large circle.</p>
<p>Need to see your full code, or a live demo to check the issues.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: t tv		</title>
		<link>https://www.binarytides.com/weld-joint-box2d-javascript/comment-page-1/#comment-65401</link>

		<dc:creator><![CDATA[t tv]]></dc:creator>
		<pubDate>Thu, 16 May 2013 10:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.browserspace.com/?p=4188#comment-65401</guid>

					<description><![CDATA[Hi Silver Moon, 

You have excellent tutorials on box2d. I have been folowing them. How ever i am facing some problem getting weld joints working.

I have attached the image. Why is the joint not holding items together. I the image1 , i have applied a -x gravity. I do not want the items to move because of it. I want them to be stacked on each other so that they move as one complete unit. Can you help me on this. Following is the code i am using for making joint.

jointArray[jointcount] = new b2WeldJointDef();

								jointArray[jointcount].Initialize(firstPositionShape.body, positionShape.body, firstPositionShape.body.GetWorldCenter());

								this.getWorld().box2dWorld.CreateJoint(jointArray[jointcount]);

jointArray[jointcount].collideConnected = true;

								jointcount++;

Another prob i see while using weld joints. is that items smudge into each other like i have shown in image2. Could you please help me on either of this.]]></description>
			<content:encoded><![CDATA[<p>Hi Silver Moon, </p>
<p>You have excellent tutorials on box2d. I have been folowing them. How ever i am facing some problem getting weld joints working.</p>
<p>I have attached the image. Why is the joint not holding items together. I the image1 , i have applied a -x gravity. I do not want the items to move because of it. I want them to be stacked on each other so that they move as one complete unit. Can you help me on this. Following is the code i am using for making joint.</p>
<p>jointArray[jointcount] = new b2WeldJointDef();</p>
<p>								jointArray[jointcount].Initialize(firstPositionShape.body, positionShape.body, firstPositionShape.body.GetWorldCenter());</p>
<p>								this.getWorld().box2dWorld.CreateJoint(jointArray[jointcount]);</p>
<p>jointArray[jointcount].collideConnected = true;</p>
<p>								jointcount++;</p>
<p>Another prob i see while using weld joints. is that items smudge into each other like i have shown in image2. Could you please help me on either of this.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
