Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

Help with Ragdoll Example (Using Joints w/o Gravity)
Started by scott097 Feb 01 2017 09:12 AM

1 reply to this topic
physics joints gravity
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 2 posts
  • Corona SDK

I'm working on some code based on the ragdoll physics example that comes with Corona. I'm trying to keep all the joints on the example, but to disable gravity, so that the ragdoll doesn't float around or move in anyway, unless you drag or put it in different positions, and even then, it should remain stationary when you're done moving it. I'm assuming this should be possible, but I can't figure out what physics or body options I should be changing to make it happen. Can anyone point me in the right direction for keeping all the joints, but disabling all the effects of gravity?



[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Corona Geek

  • 3,073 posts
  • Corona SDK

Have you tried turning gravity off?

physics.setGravity( 0, 0 )



If you mean removing the effect of gravity upon a physics body, have you tried adjusting the bodies gravity scaling?

body.gravityScale = 0 



If neither of those are options, have you tried using touch joints on each piece of the ragdoll and actually "holding" the body upon, as if on invisible string?