[Newton 2.0] Bouncing Car

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

[Newton 2.0] Bouncing Car

Postby Auradrummer » Fri Dec 19, 2008 9:00 am

Hello friends,

I made great progress with my game development. The suspension is working fine, but I'm still with problems.
My car seems that are feeling bad, like a bit scared with something :shock: !

I uploaded a video on Youtube, check it out.
http://www.youtube.com/watch?v=9zhInAYCyj8

I may clear some points:
- I'm using custom sliding contact (not car joints);
- I not added a row to limit the car from sliding left/ right;
- I not added a angle to limit the rear wheel from steering.
- I'm not touching the keyboard during this video, the car reactions are all from engine.

I think is this, I'm logging the forces in terminal to see what happens, and the forces are unstable, like the car.

Someone have some tip about what is causing this?

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

Re: [Newton 2.0] Bouncing Car

Postby Julio Jerez » Fri Dec 19, 2008 10:48 am

are you using 1.53?

since you are using custom joint to put the car together, then maybe for you it si better to use 2.0 teh car in t2.0o i steh same car in 1.53 but it is opensource an dit uses teh same cutom joint to make the tires.
It also have some special pos presseting to mak ethe car statble at high speed.
and the supesion are easy to set.
since the car joint is opens source you can step n teh code and see hwo it is put togther, it is no that complicated for pople how undertnad how to use teh joints.
Julio Jerez
Moderator
Moderator
 
Posts: 11155
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: [Newton 2.0] Bouncing Car

Postby Auradrummer » Fri Dec 19, 2008 2:41 pm

Hi Julio,

I'm using the 2.0. I think I can do the car with Custom Joint, no? I want to be more opened as possible, so I can set each "corkscrew" of the car and achieve a perfect result with my car. The question is, I can solve the issue I'm having?

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

Re: [Newton 2.0] Bouncing Car

Postby Julio Jerez » Fri Dec 19, 2008 2:54 pm

the problem is that teh car joint is no a corck screw nor it is a slider, if is a mopre specialize joint.
please check the mutibody joint, so taht you cna see hwo teh joint are made.
Julio Jerez
Moderator
Moderator
 
Posts: 11155
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: [Newton 2.0] Bouncing Car

Postby Auradrummer » Sun Dec 21, 2008 2:16 pm

Hey Julio. I'm studying that tank example, and I paused my work for one week or more. Now, I'm back to work and I perceived a thing (very obvious, but I was not seeing).
The tank example adds forces and torque to the body and the threads.
Make sense add torque to the body of my car too, because when the forces applied to it are unbalanced (like one wheel over a kerb) the body have to rotate.
But, I cannot apply torque to the wheel, because the force applied to it is on it's center. Is different of the tank when the force applied to the tank's threads are out of center.

This isn't programming, is physics, but I have to ask: my conclusion are right?
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am

Re: [Newton 2.0] Bouncing Car

Postby Auradrummer » Sun Dec 21, 2008 2:54 pm

I observed another thing: even if I disable every forces from my model, I still have this instability. The only way it stops is when I disable the 'submit constrainst'. Let's see what more I can discover...
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am

Re: [Newton 2.0] Bouncing Car

Postby JernejL » Sun Dec 21, 2008 3:07 pm

What size is your car? how big are the shapes? it may be a floating point precision problem.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1531
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: [Newton 2.0] Bouncing Car

Postby Julio Jerez » Sun Dec 21, 2008 6:31 pm

Auradrummer wrote:I observed another thing: even if I disable every forces from my model, I still have this instability. The only way it stops is when I disable the 'submit constrainst'. Let's see what more I can discover...

The car joint is no joke is quite sofistcated and realistic for a game phsyics enigne.
whay are you stoborn, you are studing the Tank contation, but do not what to check tha car joint.

check the car joint, you will see what I do to make stable.
I am suplying a solution to you, why do you wnat to check it out.
Julio Jerez
Moderator
Moderator
 
Posts: 11155
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: [Newton 2.0] Bouncing Car

Postby Auradrummer » Mon Dec 22, 2008 7:21 am

Delfi: My car have about 5 meters long. Is the real size of a racing car.

Julio: Be cool Master :wink: ! You said, in another post, that if I want to make a simulation, I should use the custom joints, and the car joints are applicable to games, mainly. The car example I have here is that Off Road that run over boards. All of it, as I can see, is made with the car joints. Ok, I'll try the car joints :D!
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am

Re: [Newton 2.0] Bouncing Car

Postby Julio Jerez » Mon Dec 22, 2008 9:48 am

I am cool, :D :D
I am really glad you are trying to get make a car using the engine.

but I believe you have an idea that will lead you to a dead end.
Using joint in a naive way to make a fast moving body is not as simple as contention joints.
I said using the car joint is the way to make a realitic car, but there are way to make it, it is not jut conecting pieces together and hoping for them to work.
the problek is that teh very high mass ration that teh tire an dteh car body have lead to a very poor joint solution. so somethong has to be done to make the engien to produce the most effecient and meaninful solution.
Even if you manage to get it work correctly at l;ow speed you will still have to deal with the fact that the joint will not be able to keep the tires together at high speed.

the way I handle that is 1.53 was by susampling the engine update for cars only, in 2.0 is by projection.
at the very least you will learn how to made stable and how the wheels joint are implemented.
The car joint is the CustomMultiBodyVehicle, see the demo so tah you can see how it is put together.

The car joint is a hierarchy of joint,
the parent is the car body, which is a unilateral, and it have children joint, for each tire, including differential joints.
please check it out and then you can make you own,
the worst thing you want to do is using plane ordinary joints to connect tire to the car body, it will not work.

That approach will only work for Academic projects where the interest is steady state simulation and real time is not as important.
Julio Jerez
Moderator
Moderator
 
Posts: 11155
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: [Newton 2.0] Bouncing Car

Postby Auradrummer » Mon Dec 22, 2008 12:22 pm

Ah, really, I think I got it now. That make my head be more clear. I'll use the car joints now. I'm still learning, but I'm feeling that I learnt a lot of things since I began. Let's go!

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

Re: [Newton 2.0] Bouncing Car

Postby JernejL » Mon Dec 22, 2008 1:14 pm

Auradrummer wrote:Delfi: My car have about 5 meters long. Is the real size of a racing car.


How many actual *units* is that?

I mean the number / units in physical sense, not meters or inches and weird stuff like that, i want to know what you send to newton, so if you use 1 unit = 1 meter then you would be fine as long as you dont go around beyond 4096 units from world origin, but if 1 unit = 1 Cm then you might be having a floating point precision issue.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1531
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: [Newton 2.0] Bouncing Car

Postby Auradrummer » Mon Dec 22, 2008 2:33 pm

Delfi,

Yes, I'm using 1 meter = 1 unit. So, that shouldn't be this the problem, right? I'll try to follow the Julio's tips and keep the results.
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