Jump to content

Sign in to follow this  
cj bravo

Rollin a Sphere inside a moving body

Recommended Posts

Hey there,


I've got a sphere laying in a moving base.   I'm trying to rotate the sphere correspondingly with the base movement.

Right now i've tried xpersso set drive/driven - the base z/x position to the sphere pitch/bank.  but it's not really synced...


I've tried to play with dynamics but no luck... the base or sphere are flying everywhere and not sure what definitions should I make to each other.

Eventually i'd like to have many balls rolling around hitting each other so I'm guessing I should continue trying the dynamics.

any suggestions?

I'm a novice here so I'd appreciate the layman terminology and baby steps...

Share this post

Link to post

The plug in Roll It is good for rolling stuff. You put the sphere in a parent null, move the null and the sphere just rolls as if it were touching the ground. It can roll irregular objects, so has an auto radius setting, but for spheres, I've found manually setting the radius gives a more accurate result.




BB8 Roll-It with landscape floor object



edit - works in R20

Share this post

Link to post
  • Topic Author
  • ha!

    works smoothly thanks!

    was wondering, I got the ball rolling fine now.  if i'd like to make two of those objects crash each other, how's define the dynamic bodies (ball and casing) to make a 'bumper-car' style thing...



    Share this post

    Link to post

    For actual bumper car movement, you'd need motors and wheels (and possibly random steering). You can detect collision in XPresso, then reverse the motor (or steering direction etc).


    Just getting things to bounce and keep moving for ever with dynamics is quite difficult. Increasing bounce % to achieve this can make things go crazy. Spheres seem to bounce best, and you can keep things going to some degree by detecting collision, then changing some size parameter eg constraining outer wall moves in on collision.


    In this file I've got some hidden spheres with visible stuff constrained to their movement (and hidden collision wall). You still get objects 'dead in the water' ...




    there's some custom initial velocity to get things moving


    edit - there's some bumper car type collision detection in this video (from about 30s)



    Share this post

    Link to post

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    Sign in to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    • Create New...