I think I need a tangent...

I think I need a tangent...

Post by Tony Di Croc » Fri, 11 Jul 2003 01:24:09



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...

Post by Hans-Bernhard Broeke » Sat, 12 Jul 2003 00:59:04



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.

 
 
 

1. finer tangent adjustment needed in 3dsmax

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

2. Minor image updates

3. Wild Tangent - Programmers Needed - Arcade / Classic in 3D

4. for all your apps

5. Alogrithm Needed: arc tangent to a line and arc

6. Trasparent Texture mapping

7. Tangent Plane Algorithm Needed

8. Slow updates to component/form

9. Dedicated 3D magazine needed (I think)

10. Tangent Design creates graphics for your WWW pages.

11. Tangent Plane Continuity

12. Tangent vectors of Kochanek-Bartels splines