Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

problems with wheel joint, too loose
Started by wernersbacher Feb 02 2019 02:16 PM

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

wernersbacher

[GLOBAL: userInfoPane.html]
wernersbacher
  • Observer

  • 2 posts
  • Corona SDK

Hey guys,

 

I try to build a car from a body, two wheel and 2 joints. It works, but when I put a value to big in as last parameter (> 45), the car is flying all around, bugging like hell.

 

I try to increase this value to make the spring more stiff, but it's not working like intended.

 

Some sample code:

local wheel1Joint = physics.newJoint("wheel", carShape, wheel[1], wheel[1].x, wheel[1].y, 1, 40);
wheel1Joint.isLimitEnabled = true
wheel1Joint.springFrequency = 3
wheel1Joint.springDampingRatio = 0.5

Hope there is someone who can help me out.

 

Kind regards 

Markus




[topic_controls]
[/topic_controls]