2 Replies Latest reply on Aug 26, 2007 5:02 PM by James Newton, ACP

    havok "floating" platforms - need some advice

      Hi all, I hope this makes sense enough:

      I'm trying to create a object that will act as a moving platform in an "free-floating" world. Basically, the player( a ball) is rolling around on a surface comprised of different blocks and the idea is not to fall off. I'm wanting to create this platform (and different moving variations of it) to take the player to seperate, unconnected blocks or surfaces.

      Although i know it's not the way to do it, I've got it working somewhat by creating a moveable rigid body, keeping it pinned, and then changing the body's position directly. My problem is, if I try to use the "correct methods" of either interpolatingMoveTo or CorrectorMoveTo, gravity effects the simulation and the platforms move in a non-precise manner. if I apply and anit-gravity force to the objects, then once the player hits these platforms, they float off in the typical "no gravity" way.

      Doing what I've been doing works as longs as i keep the amount of movement per frame very low (resulting in very slow platforms), but when I speed things up of course collision fails because i've moved the object without applying a force or impulse.

      Does anyone have any general ideas on how to use a platform with havok like this?

      thanks in advance for any advice!
        • 1. havok "floating" platforms - need some advice
          Skavengur Level 1
          Got it! For future reference, though I may be the only one that DIDN'T know this...

          Had to pin the rigid body, enable and use the correctorMoveTo, then when it reaches it destination re-pin it and disable the corrector....rinse, lather, repeat. Apparently using correctorMoveTo unpins a rigidBody as the platform was succumbing to gravity once it reached it's first desired location (the platform moves back and forth or up and down repeatedly). So I also had to add a reverse gravity register to keep the platform on a consistent course, otherwise gravity started dragging it down over a period of time.

          Hope that helps someone else in the future, as i took up plenty of my time today. :-) Gary Rosenzweig's "Special Edition Using Macromedia director MX" rocked.....just wish he had spoke about the havok corrector. He explains everything else so well (at least for a beginner's reading) but there is almost no corrector info out there. Anybody know of any tucked away somewhere????

          • 2. Re: havok "floating" platforms - need some advice
            James Newton, ACP Level 3
            I've posted a demo which uses a technique similar to the one you describe, at http://nonlinear.openspark.com/tips/3D/platform/

            Source code available.