Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Add friction into pivot
Started by prographodeveloper Dec 04 2018 08:57 AM

3 replies to this topic

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

prographodeveloper

[GLOBAL: userInfoPane.html]
prographodeveloper
  • Contributor

  • 298 posts
  • Corona SDK

I have a pivot which attaches a dynamic object to a static point. The dynamic object is a rectangle. It is attached at one end. Gravity is on. I start the rectangle vertically. When everything starts it swings. This is correct.

It slows down over time. This is also correct. But how can I apply extra friction to the joint so that it slows down quicker. The thing is still swinging away after 3 minutes.



[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,585 posts
  • Corona SDK

You can't apply friction to the pivot joint.

 

You can add linear damping to the rectangle (since it is swinging off-center).  That will achieve your goal.



[TOPIC: post.html]
#3

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,585 posts
  • Corona SDK

[TOPIC: post.html]
#4

prographodeveloper

[GLOBAL: userInfoPane.html]
prographodeveloper
  • Contributor

  • 298 posts
  • Corona SDK

Perfect. Brilliant.




[topic_controls]
[/topic_controls]