<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13108" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2020-11-24T22:32:23+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13108</id>

		<entry>
		<author><name><![CDATA[touchtao]]></name></author>
		<updated>2020-11-24T22:32:23+00:00</updated>

		<published>2020-11-24T22:32:23+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43191#p43191</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43191#p43191"/>
		<title type="html"><![CDATA[Soccer net and ball emulation problems]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43191#p43191"><![CDATA[
Hi:<br>   I'm writing a soccer game use bullet now. But when write the goal net, I met some strange problem, Hope somebody can help me.<br>   1. I use btMultiBody to simulate the ball, not btRigidBody, because I need use rolling friction. btRigidBody with rolling friction will not roll in straight line on a plane. Ball mass : 0.265, Ball radius : (0.221/2.0);<br>   2. I make a test goal net for 2 meter X 2 meter, resolution 5 X 5,  four corner fixed. code below:<br><br>  const btScalars=2;<br>m_ActorBaseInfo.pSoftBody = btSoftBodyHelpers::CreatePatch(*m_pGameParam-&gt;pSoftBodyWorldInfo,<br>btVector3(-s,2,+s),<br>btVector3(+s,2,+s),<br>btVector3(-s,2,-s),<br>btVector3(+s,2,-s),<br>5,5,//9,9,//31,31,<br>1+2+4+8,<br>true);<br>btSoftBody::Material* pm=m_ActorBaseInfo.pSoftBody-&gt;appendMaterial();<br>pm-&gt;m_kLST=0.1;<br>pm-&gt;m_kAST=0.1;<br>pm-&gt;m_kVST=0.1;<br>pm-&gt;m_flags-=btSoftBody::fMaterial::DebugDraw;<br>m_ActorBaseInfo.pSoftBody-&gt;m_cfg.kDP=0.2;<br>m_ActorBaseInfo.pSoftBody-&gt;m_cfg.kDF=1;<br>m_ActorBaseInfo.pSoftBody-&gt;m_cfg.kSRHR_CL=1;<br>m_ActorBaseInfo.pSoftBody-&gt;m_cfg.kSR_SPLT_CL=0;<br>m_ActorBaseInfo.pSoftBody-&gt;m_cfg.collisions=btSoftBody::fCollision::CL_SS+btSoftBody::fCollision::CL_RS;<br>m_ActorBaseInfo.pSoftBody-&gt;generateBendingConstraints(2,pm);<br><br>m_ActorBaseInfo.pSoftBody-&gt;getCollisionShape()-&gt;setMargin(0.05);<br>m_ActorBaseInfo.pSoftBody-&gt;setTotalMass(1);<br>m_ActorBaseInfo.pSoftBody-&gt;setSpringStiffness(0.1);<br><br>m_ActorBaseInfo.pSoftBody-&gt;generateClusters(0);<br>m_pGameParam-&gt;pDynamicsWorld-&gt;addSoftBody(m_ActorBaseInfo.pSoftBody);<br>    <br>   When I drop the ball above the net, the ball will not hold the ball, the ball will still fall on the ground.  This is different with the result I use brRigidBody to simulate the ball. If I use the btRigidBody to simulate the ball , the goal net will hold the ball. Is something wrong with my code ?<br>   3. When I use deformable-softbody to simulate the goal net, the net will hold the ball when ball fall above. But the FPS is very low, need too much CPU. So I just want to use the cluster softbody to simulate the net.<br>   <br>   So the final question is : How to setup the softbody to simulate the goal net to hold the ball, with btMultiBody to simulate the ball, Cluster based softbody to simulate the net. <br>    Please somebody to help me, thank you very much.<dl class="file"><dt class="attach-image"><img src="https://pybullet.org/Bullet/phpBB3/download/file.php?id=1848" class="postimage" alt="goal net" onclick="viewableArea(this);" /></dt></dl><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13833">touchtao</a> — Tue Nov 24, 2020 10:32 pm</p><hr />
]]></content>
	</entry>
	</feed>
