Share with us how are you using the powerrrr of the force
Moderator: Alain
by Julio Jerez » Wed Nov 26, 2008 4:27 pm
Actually I will be interested in see how Master Sury when about implementing ray cast car.
The biggest problems in making a ray cast car is there it can no t be coded as an emerging physics behaviors.
Since tire equations are empirical, and are only define for vehicle moving at some speed, they because very untreatable when implemention car that need to run at low and high speed.
Maybe if I can see the code form both Master K00m, and Master Sury, I can combine the best of both and finally make the ray cast car.
I think that lots of Apprentices will appreciated that.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Sury » Wed Nov 26, 2008 4:46 pm
I will contribute mine.
It's ugly and has DX9 stuff in it. It works on newton 1.53(2), and behaves strange with new versions. Suspension is OK, but userjoint is somehow different.
Give me some time to finish some stuff.
-
Sury
-
- Posts: 193
- Joined: Sat Aug 14, 2004 5:32 am
- Location: Bulgaria
by Julio Jerez » Wed Nov 26, 2008 5:06 pm
I take it.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Thu Nov 27, 2008 9:18 am
Suri if possible, you can send it to me the way it is now, I can figure out.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Sury » Fri Nov 28, 2008 3:26 pm
Hi,
yesterday i sent you the code i have, along with two messages. I got no response. Did you get it ?
-
Sury
-
- Posts: 193
- Joined: Sat Aug 14, 2004 5:32 am
- Location: Bulgaria
by Julio Jerez » Fri Nov 28, 2008 4:28 pm
Oh yes I have it, I am looking at it.
Is this the class you are using in you video?
I was tryin to find teh youtive video, but I cna no remember a key war for senrching it.
I think the code is clear, and I cna take teh pieces I nee to complete teh Ray cast Joint in teh engine.
I think it iwll be very aprecisted by many aprentices. Soem are getting impacient already.
coudl you tell me roughfully what teh forceand torque do an dwje teh joint do.
I can see the force and torque apply the suspention and the engine forces, but I do not see what is teh job of the joint.
Than you very much
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Sury » Fri Nov 28, 2008 4:43 pm
Yes, that's the exact code i'm using. The code from the video is a bit older.
Probably this is the video, you were referring
http://www.youtube.com/watch?v=bDg9gTROylA I will try to rip parts of my projects to make a small application, so you see. There are very few imposrtant tricks. The first is, that i'm actually offseting the position where the forces are applied. For a better stability, i'm applying forces not on tire position, but a bit offset to the center of the body, or "outside" the body. Second is I rotate the a matrix according to the front tires, take the right vector and apply LinearRow where they point. No setrowacceleration is used. Suspension damping is based on your sample posted on forums long time ago.
-
Sury
-
- Posts: 193
- Joined: Sat Aug 14, 2004 5:32 am
- Location: Bulgaria
by Dave Gravel » Fri Nov 28, 2008 5:01 pm
The offseted force apply on a directional point is currently what I use too with the current newton raycast vehicle.
It's working pretty good in general, only on air and with slip situation it need some tweaking.
The major problem that I get currently is when my tire is more big that the normal vehicle shape.
-
Dave Gravel
-
- Posts: 800
- Joined: Sat Apr 01, 2006 9:31 pm
- Location: Quebec in Canada.
-
by agi_shi » Fri Nov 28, 2008 5:48 pm
Just a quick question, are raycast vehicles single bodies? Or are the tires/etc separate bodies? I'm looking to implement vehicles that go correctly through portals, and if the tires/etc were separate bodies, it'd be a bit hard
-
agi_shi
-
- Posts: 263
- Joined: Fri Aug 17, 2007 6:54 pm
by Dave Gravel » Fri Nov 28, 2008 6:08 pm
Yes only a body the rest is casted collision shape's.
-
Dave Gravel
-
- Posts: 800
- Joined: Sat Apr 01, 2006 9:31 pm
- Location: Quebec in Canada.
-
by agi_shi » Fri Nov 28, 2008 8:31 pm
Sounds great
. Being the physics newbie I am, right now I'll just lay back and wait for the ray cast car thing to be finished
good luck, and it's looking great so far
-
agi_shi
-
- Posts: 263
- Joined: Fri Aug 17, 2007 6:54 pm
by TheoLogic » Thu Dec 11, 2008 6:04 am
k00m; could you please tell me how you calculate your torque.
My vehicle is: or very slow, or the tires spin like hell.
Thx!
-
TheoLogic
-
- Posts: 35
- Joined: Thu Oct 02, 2008 5:27 am
by Dave Gravel » Thu Dec 11, 2008 6:09 am
I don't use torque at all to make it move, I only use torque to simulate the spinning visual tire effect.
I only apply a directional force at point on the vehicle body.
-
Dave Gravel
-
- Posts: 800
- Joined: Sat Apr 01, 2006 9:31 pm
- Location: Quebec in Canada.
-
by Dave Gravel » Thu Dec 11, 2008 6:09 am
I don't use torque at all to make it move, I only use torque to simulate the spinning visual tire effect.
I only apply a directional force at point on the vehicle body.
-
Dave Gravel
-
- Posts: 800
- Joined: Sat Apr 01, 2006 9:31 pm
- Location: Quebec in Canada.
-
by TheoLogic » Thu Dec 11, 2008 6:23 am
And how do you rotate the vehicle?
-
TheoLogic
-
- Posts: 35
- Joined: Thu Oct 02, 2008 5:27 am
Return to User Gallery
Who is online
Users browsing this forum: No registered users and 1 guest