Problem with Land Hill?

Blitz3D Forums/Blitz3D Beginners Area/Problem with Land Hill?

Hotshot2005(Posted 2005) [#1]
Hiya all

How do I make the PHYSIC work for Hoover Craft to move up and down on land hill?

here the screenshot



cheers


WolRon(Posted 2005) [#2]
I would imagine that a Linepick downward would work fine.


Finjogi(Posted 2005) [#3]
(prepare for confusing explanation :) )
- Create imaginary forcefield around your ship (sphere or halfsphere or just under ship)
- do linepic all around forcefield to find polygons that are inside forcefield (16-32 linepicks?)
- calculate force vector for each picked polygon to centerpoint of the ship (use polygon normal to adjust force depending angle, -> "polygon_to_triange_vector DOT triange_normal")
- add all forces and tilt & move ship to that direction -> ship float on top of polygons

Just an idea :)


VP(Posted 2005) [#4]
(have never used linepick or any other 3D stuff...)

I would have thought you only needed to linpick 3 lines.

1 line down and forward in the direction of motion of your craft. How far forward? Depends how fast your craft is travelling. Very slow = linepick almost directly beneath your craft. Very fast = linepick quite far ahead (to anticipate upcoming hills).

2 lines either side of the first line, to match the width of your craft. A little creative thought would then mean you have everything you need to tilt your craft at the same angle as the ground you are covering.

Add a weighting to everything you do, otherwise your craft will respond to the landscape as if it were attached to it without any suspension!


Ross C(Posted 2005) [#5]
No need to really do 14 line picks. One should be enough. If you can work out a vector for how fast your craft is going, and point the linepick in the direction. Use align to vector along with the normals of the line pick, to align the craft to the ground.


jhocking(Posted 2005) [#6]
(16-32 linepicks?)

Where the hell did you come up with these numbers?


Finjogi(Posted 2005) [#7]
I was thinking whole hovercraft simulation.. suspension and bumping from terrain and stuff like that. How else you could sense terrain shape around vehicle if not using few linepicks?




Ross C(Posted 2005) [#8]
What to do really, is do a line pick, from above the craft, downwards, then align to vector using the normals. Do the line pick straight down, however, relative to the craft,