Quantcast
Channel: Questions in topic: "weight"
Viewing all articles
Browse latest Browse all 136

Simulating weight on RigidBody2D objects?

$
0
0
Hi, I'm trying to solve a problem i'm having with some of the 2D objects I have in my current 2D test scene. I have 3 objects, a cup (light weight object), a table (medium weight object) and a fridge (heavy weight object). At the moment I can pick up each object using the mouse. Each object has a targetJoint2D attached to it and I set the anchor point to be the part of the object clicked, and then the target of the joint to be the mouse. In this way I can pick up each object and it appears to swing from the mouse. My issue comes with simulating the weight of each object. If I pick up the fridge and throw it at the cup, it sends the cup flying as is to be expected. But if I pick up the cup and throw it at the fridge it sends the fridge flying too. The fridge should not be affected by being hit with a light object. Is there a way to give objects, or the rigidbodys attached to them a weight that would affect how other colliding objects impact them? Thanks

Viewing all articles
Browse latest Browse all 136

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>