Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Stop object from reacting to collisions
Started by sergeybakaenko Jul 10 2018 06:34 AM

2 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

sergeybakaenko

[GLOBAL: userInfoPane.html]
sergeybakaenko
  • Observer

  • 2 posts
  • Corona SDK

I have the circle that is rotating and also I have items that I throw at this circle, but I don't want the circle to be "pushed" or moved from its position, after items I throw hit it. Also, after a collision with items, circle changes its center of mass and starts to spin slowly and that is expected behavior, but still I don't want this.

My goal is to achieve a situation when I throw an item at this circle, it "sticks" to it and circle is not moved and not slowed, just keeps spinning like it was before, but with some items on it.
 



[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,380 posts
  • Corona SDK

make the circle a sensor or make the objects you're throwing sensors.

 

alternately make the circle body kinematic



[TOPIC: post.html]
#3

sergeybakaenko

[GLOBAL: userInfoPane.html]
sergeybakaenko
  • Observer

  • 2 posts
  • Corona SDK

make the circle a sensor or make the objects you're throwing sensors.

 

alternately make the circle body kinematic

I did it for both items, but the way I "stick" them together is through the "weld" type joint. After this, all the stuff i describe above happens. 
Probably, it's not the right way to stick one object to another, but its the only one I have found. 
If I am not creating joint, item that i threw at the circle stays in the same place where its landed, not spinning with the circle 




[topic_controls]
[/topic_controls]