Raycast vehicle (Newton) [solved]

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Raycast vehicle (Newton) [solved]

Post by freetimecoder »

Hi,

I need to implement raycast vehicles with newton, but I don't know how. I searched in the forums, with google etc. I also got some code or explainations here and there but I can't make head or tail of it :(

I got so far that I ended up with a vehicle that bounces wildly up and down and after time lifts up in space to be never seen again, sometimes it just fells over and thats that.

What I do: Add gravity to the cassis. Sending out rays from the tire positions to return collision points with the ground. Depending on how far the collision point is from anchor of the tire I add force on that position contrary to the gravity direction.

I somehow need to dampen the bouncing, but also make sure the tires do not fall through the ground.

any ideas?

greetings
Last edited by freetimecoder on Tue Jun 22, 2010 3:43 pm, edited 1 time in total.
nespa
Posts: 167
Joined: Wed Feb 24, 2010 12:02 pm

Post by nespa »

freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Post by freetimecoder »

Well it is a car, but I see no raycasting there and I don't want to sign up on a site to download _one_ file :roll:
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Post by freetimecoder »

Ok since there were no further responses I signed on to the site and downloaded the file, then the IPhysics wrapper and everything is as expected. The Vehicle is derived from the SimpleVehicle class from newton and has nothing to do with raycasting.

A simple tutorial or hint how to handle the physical forces would be nice. Anything that goes beyond inbuild physics functions like "useRayCarAndDoEverythingElseInternally" ;)

greetings
Viz_Fuerte
Posts: 91
Joined: Sun Oct 19, 2008 5:29 pm
Location: Valencia (Spain)
Contact:

Post by Viz_Fuerte »

Raycast vehicles with Newton... Hard topic :lol:

It seems that you'll have to use (if using the latest version of Newton), the library JointLibrary and look in detail at the examples hacerca this topic.

I got to operate a vehicle example, it is easy but messy.

Look at these examples:
http://newtondynamics.com/wiki/index.ph ... =Tutorials
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Post by freetimecoder »

Thanks for the reply, I looked at the links on the site, but the only thing that would fit my purpose :(
http://newtondynamics.com/wiki/index.ph ... aycast_car
is not finished

I know how to cast rays and all that, I need to know how to calculate the forces I need.

PS: I am not using the latest newton version, I use 1.53 with the IrrNewt wrapper.

greetings
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Post by freetimecoder »

Since it is getting urgent I did a more extended research on physics, forces, springs, etc. and I found this
http://www.gamasutra.com/view/feature/3 ... php?page=2

It is a bit bumpy yet but at least it is working.

greetings
Post Reply