# Neat book! (and Hovercraft)

(rndrdbrian) #1

Hey all, Just bought myself a rather interesting book today,

“Physics for Game Developers” by David M. Bourg.

Quite a lot of math in the book, but it may be interesting to try some of the demo code (which is in C), using python scripts in the game engine…

Some of the stuff included in the book are collisions, projectiles, kinetics, cars, aircraft, and , hovercraft!. Quite an expensive book though, 30 UK pounds

Anyway while tramping around the bookshops tryinf to find the book (eventually got it in the 3rd bookshop I tried), I had a thought regarding my hovercraft simulator.

Why not make the hovercraft circular in shape, making the collision detection easy peasy! I know, thats cutting corners, but it’ll do for now until blender gets rectangular collision detection in it.

Cheers

Brian (de-lurking in the game engine forum!)

(z3r0 d) #2

I saw something related… in blender …

… one of the files I download off of pablosbrain had a .blend called something like racer20.blend…

By using the Fh Settings in materials it allows the vieichle (a powerboat) to sink, and rise approaaitely, and be rotated to suit the ground, and …

it was in demo211.zip or demo212.zip (or both) on http://www.pablosbrain.com/blender3d/demos.php

If you do not wish to download it, play with the dynamic material settings, and especially the FH related ones, and turn on [Fh], and [rotFh] (or similar) for the object.

FH is for material forces, and friction changes (when the object is closer than FhDist [material buttons] units away)
FhRotate (or similar) will let the object be rotated such that it’s usual down points perpendicular to the faces of that material. It doesn’t require the object to be set to a rigid body, but when in the ‘air’ it may act like one. Veeerrryy useful

You can have the distance an object is away from a material kind of change the movement friction of the object, or have the object kind of magneticly repel away from the material, or both

I don’t think this made sense. Somebody with a clear thought path should re-explain what I have said.

(rndrdbrian) #3

Thanks for the reply. I have played around with the fh settings, and I got a hovercraft moving in a hovercraft type way.

But I want to try doing some python code to simulate the hovercraft. This is where the book comes in handy, as it has some C code for hovercraft simulation.

cheers

Brian

(Rollit71) #4

Hi,
how would you use the C demo code…
will you try to replicate the C demo code by rewriting it in Python… or can you call/Use C code within a Python scrpit

Thank you
Rollit71

(rndrdbrian) #5

The easiest way is to rewrite the code using python. I’m not sure about calling C code within python. It may be possible, i’m not sure.

Brian

(Pooba) #6

Yeah, the FH settings are nifty.

You can also make an object rotate to copy the plane’s tilt with fh settings.

pooba

(snowy_duck) #7

u know what would be really cool? if blender had a on off button that made all the children have dynamic forces on it like if it hit a wall the front end would tell the car to stop and u wouldn’t have to mess with all those messages and cross linking. and what would be kooler is that the main dynamic actually moved and rotated from the children that means a car going up a ramp to car would rotate by all things touching the ground! that would make dynamics a sinch but that’ll probably onlt happen in like blender 4.0 but if someone did that from the open scource that would be awsome!