How make a collision child of a body

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

How make a collision child of a body

Postby Auradrummer » Fri Oct 09, 2009 10:36 am

Hello guys,

After too many time, I can say you that my game is growing faster! Thanks to everybody.

Now, I'm with a little problem:

I made a raycast car and it is working very good. I want to make the tires collidable but think that there's no need to make a rigid body. The only thing I need it that the collision of tire follows the car and moves up/down (suspension movement) and the front wheel rotate by Y axis (steering).

Is possible? Is the best thing I do?

Thanks again!!!
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am

Re: How make a collision child of a body

Postby Ripiz » Sat Oct 10, 2009 1:30 am

I think you will need to use custom joints for suspension, and basic joint for tire rotation
There is one or two demos with cars, if one their tires are rotating, you could use it
Ripiz
 
Posts: 47
Joined: Sat Oct 03, 2009 12:07 pm

Re: How make a collision child of a body

Postby Auradrummer » Mon Oct 12, 2009 9:39 am

Thanks Ripiz,

I didn't understood very well this part of the code. I understood that the graphics wheels aren't the physic wheel. The collision can be still and only the graphics spin. Joints are only appliable to rigid body, according I know. But there seems to be a collision shape to wheels without a rigid body construction. This is the question. I'll keep studying here and see what I get.
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am

Re: How make a collision child of a body

Postby Auradrummer » Mon Oct 12, 2009 3:12 pm

I'm looking here:

I didn't found anything in David Gravel's code that I believe to be an update to collision shape position. This make me think that the collision of his tire doesn't move. This is right?
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am

Re: How make a collision child of a body

Postby Auradrummer » Mon Oct 12, 2009 3:19 pm

The collision moves, I saw in the demo 'show collision'. keep trying...
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am

Re: How make a collision child of a body

Postby Auradrummer » Mon Oct 12, 2009 3:57 pm

I built with compound collision (what a great thing this is!!) and got good results.

But, as the wheels are stuck to the body, I lost part of suspension movements. When the wheels goes up, the collision hits the ground. I'm thinkin in slicing some part of the wheels, this way I'll get it working correctly.

But, if someone have any information, I'll be glad.

I don't want to use default vehicle joint, because my car is implemented in another way. And I want to make some "looseable" parts too, like nose cone.
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests