How to create a realistic car using wheel joints?

Hello. I’m trying to create a car using wheel joints, but found no way to make it work. The wheels goes away like if there was no joint.

How do I do?

I already tryed the cart car sample, but it does not use wheels joints and it’s not so realistic.

thanks.

This might help, it looks like it still works: 

https://github.com/MarkHenryC/BillyCart

Cheers,

Ed

Billy cart is nothing realistic, Look how the dampers works. The wheels goes back and forth and not up and down.

Yes, you are right it isn’t realistic, but it is one of the better solutions I’ve seen and can be easily modified as well as tested since the developer provided a way to move the car and test it on ‘hills’ + ‘flats’

 

http://www.youtube.com/watch?v=DIPOy7lZ8As

** UPDATE ** 

If any other readers find or have a nice car solution with more realistic shocks, please share.  I too would love to see how this works or can be accomplished.

It would be very simple to be done using wheel joints, if they work. I think there is a bug with wheel joints in corona.

I use LevelHelper to build the cars with joints. I tryed several ways. With wheel joints the car works fine on levelhelper viewer, but when run from corona, the wheels go away like if there was no joints.

I finally got a more realist car. Used like a square to be the car body, and two other small rectangles to be the dampers, connected to the big square by prismatic joints with limit set.

Added two circles as wheels conected each one to his damper by a revolute joint.

Set category bits and mask bits, to avoid the wheels from colliding with the car body or dampers, and this make them work smooth.

Setting a density too low for the wheels would make they go back and forth…

I also added some distant joints from wheel to wheel, but this may be unecessary… As soon as my game is finished I’ll publish a video

I made a video of my car.

[media]http://www.youtube.com/watch?v=JhcFBYLdWUg[/media]

I use levelhelper to add the joints

Congrats and thanks for sharing the video.  Questions:

  1. Is it one prismatic (piston) joint per tire?

  2. If yes, have your considered using two per tire?  That might help solve some of the remaining back and forth sway.

  3. Could you show another video with physics hybrid rendering turned on?  

  4. Do you think you’ll share a code recipe?

Again, congrats!

1 - Yes. I use just one. I didnt try more than this. I solved some of the back and forth problems by changing some settings like density of the wheels, and etc.

a video showing the physics would not show too much. Maybe later I upload one…

For now, I’m letting a project of a car, made like I made mine.

O6X48SP.png


Remembering that you must disable collisions between the wheels and the rest of the car, or the wheels can touch the car body or chassis and the friction will be works for the performance of the car.

You can do this by setting bit category and mask bits. This is a few complicated to understand. I recommend this article:

http://developer.coronalabs.com/forum/2010/10/25/collision-filters-helper-chart

I am still new to corona, but I hope I can help someone with this info.

This might help, it looks like it still works: 

https://github.com/MarkHenryC/BillyCart

Cheers,

Ed

Billy cart is nothing realistic, Look how the dampers works. The wheels goes back and forth and not up and down.

Yes, you are right it isn’t realistic, but it is one of the better solutions I’ve seen and can be easily modified as well as tested since the developer provided a way to move the car and test it on ‘hills’ + ‘flats’

 

http://www.youtube.com/watch?v=DIPOy7lZ8As

** UPDATE ** 

If any other readers find or have a nice car solution with more realistic shocks, please share.  I too would love to see how this works or can be accomplished.

It would be very simple to be done using wheel joints, if they work. I think there is a bug with wheel joints in corona.

I use LevelHelper to build the cars with joints. I tryed several ways. With wheel joints the car works fine on levelhelper viewer, but when run from corona, the wheels go away like if there was no joints.

I finally got a more realist car. Used like a square to be the car body, and two other small rectangles to be the dampers, connected to the big square by prismatic joints with limit set.

Added two circles as wheels conected each one to his damper by a revolute joint.

Set category bits and mask bits, to avoid the wheels from colliding with the car body or dampers, and this make them work smooth.

Setting a density too low for the wheels would make they go back and forth…

I also added some distant joints from wheel to wheel, but this may be unecessary… As soon as my game is finished I’ll publish a video

I made a video of my car.

[media]http://www.youtube.com/watch?v=JhcFBYLdWUg[/media]

I use levelhelper to add the joints

Congrats and thanks for sharing the video.  Questions:

  1. Is it one prismatic (piston) joint per tire?

  2. If yes, have your considered using two per tire?  That might help solve some of the remaining back and forth sway.

  3. Could you show another video with physics hybrid rendering turned on?  

  4. Do you think you’ll share a code recipe?

Again, congrats!

1 - Yes. I use just one. I didnt try more than this. I solved some of the back and forth problems by changing some settings like density of the wheels, and etc.

a video showing the physics would not show too much. Maybe later I upload one…

For now, I’m letting a project of a car, made like I made mine.

O6X48SP.png


Remembering that you must disable collisions between the wheels and the rest of the car, or the wheels can touch the car body or chassis and the friction will be works for the performance of the car.

You can do this by setting bit category and mask bits. This is a few complicated to understand. I recommend this article:

http://developer.coronalabs.com/forum/2010/10/25/collision-filters-helper-chart

I am still new to corona, but I hope I can help someone with this info.