## I think I need a tangent...

### I think I need a tangent...

I'm building a 2D skateboarding game that allows the player to skateboard
over arbitrarily curved surfaces... When a skater is skating along the
ground, one of the first things I do per frame is calculate (by following
along the curved ground) where his wheels should be at the next frame...
Let's call these points (B) and (C)...

I position my sprites relative to a  point at the center of the sprite...
This is also the axis around which a sprite can rotate... Lets call this
point (A)....

If the skater is standing on flat ground, (A) is above and directly in the
middle of (B) and (C)...

BUT, if (B) and (C) are on a slope, how can I determine where (A) is?

Tony

### I think I need a tangent...

Quote:> If the skater is standing on flat ground, (A) is above and directly in the
> middle of (B) and (C)...
> BUT, if (B) and (C) are on a slope, how can I determine where (A) is?

You make a better model of a skater.  Skaters are not solid object screwed
onto their board.  They have legs, which they can flex and stretch at will.

You may end up with something like this: (A) is still exactly above
the middle of (B) and (C) (3D middle, i.e. average of these points),
but the distance is governed by the height difference between B and C
(down-slope leg presumed straight).

You'll almost certainly need more than a single sprite, too, so maybe
you should re-think you choice of reference point, too.  Might be
easier to just use the center of BC, for all of them.

--

Even if all the snow were burnt, ashes would remain.

Hi!

Does anyone know if there is any way (if so what way) to adjust the
bezier control points (tangent points) of an editable spline in 3dsmax4
to the grid (it is currently not adjusted) or if there's any way to
enter the coordinates of these tangent control points (the little green
squares that appear when selecting a vertex) via keyboard after the
creation of the spline?

Thanks says

Silver