TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 11 of 11

Thread: is it possible to achieve a pendular motion with unjointed objects?

  1. #1
    Member
    Registered: Feb 2000
    Location: Paris, France

    is it possible to achieve a pendular motion with unjointed objects?

    I'd like to achieve a seamless swinging motion, a back-and-forth swaying of various objects objects for one of my missions. However, I'm having difficulty in achieving this with Rotate property. The closest I've gotten results in the object moving in a jerky manner, "skipping", kind of like a broken record. Here's my setup so far:

    RotateState
    AnimS On

    Rotate
    Halt Continue
    AnimC Sim
    Primary Axis 0
    y rate-low-high X:3 Y:-20 Z:20

    What am I missing?

    The effect is easy to achieve if I use jointed objects and give them the StdLever script. But so far I haven't been able to achieve a seamless back-and-forth sway using unjointed objects. I'd rather not have to make custom objects if possible. Can anyone help? Thanks in advance.

  2. #2
    Member
    Registered: Jan 2001
    Location: Pushing my luck with Dromed
    Negative rotation angles aren't valid. I think Tweq Rotate actually rotates the object, which is also why you can't set it to 340 in Dromed and have the tweq go from 0 to 40.

    You can attach the object to an invisible jointed object. Make a non-physics object (e.g. a marker made visible) with the model name you want, and use a DetailAttachement link to a lever (or other jointed object). You don't need the StdLever script and you can use negative values there. The link box also allows an offset. Example:
    Invisible big floor lever:

    The 'pendulum' flag smooths out the swinging.

    Attached object (locking bar from the bank) DetailAttachement link:

  3. #3
    Member
    Registered: Oct 2018
    Location: Melbourne, Australia
    I don't have an install of OldDark handy, but I was under the impression that the Pendulum(/BounceHi) flag was added for NewDark, which Sperry is unable to take advantage of.
    I'm also unable to provide much help in answering the actual question. The closest I've found is the GrandfatherClock in Keeper of The Prophecies mission 2 (obj 751), but even that isn't perfect.

  4. #4
    Member
    Registered: May 2017
    Location: USA
    You could make it a rotating door which opens and closes, and set a cog offset where you want it centered.

    This won’t give it speed changes to approximate true swinging. But if you just want an it to slide smoothly back and forth along an arced path, this should work just fine.

  5. #5
    Member
    Registered: Jan 2001
    Location: Pushing my luck with Dromed
    Quote Originally Posted by DirkBogan View Post
    ...was added for NewDark, which Sperry is unable to take advantage of...
    I remembered that just after I posted, but decided to leave it up as a way of showing yet another nice feature of NewDark.

  6. #6
    Member
    Registered: May 2002
    Location: Texas
    Does the object have to sway equally in the negative direction as the positive? I've used swaying lamps like those in LS5 Part 2 and they sway from 0 to some positive number. The effect is achieved even though the sway doesn't reach negative rotation. Also I used TweqOnOff script to make the rotation turn on and off. The thing about stopping a rotation is that it won't necessarily stop at 0 like you would expect in RL because gravity doesn't have any effect on the sway of the object.

  7. #7
    Member
    Registered: Feb 2000
    Location: Paris, France
    Some good information here, thanks everyone. Yes john9818a, I'd prefer having it sway with both positive and negative values. I can't see why they would have made negative values invalid. Using doors could work if I can keep the object count low enough in the rest of my mission. Thanks for the feedback anyway, and even if I'm indeed not using NewDark, the related information above could be useful for others.

    I have a final question regarding this topic: what about making a rope mesh sway back and forth? How could one achieve this? For context, imagine a climable rope with a heavy crate attached to it (via a particle attachment link I imagine), which must sway from side to side, like a pendulum. Could one achieve this in DromEd?

  8. #8
    Member
    Registered: May 2002
    Location: Texas
    Another idea I have is to load the object in Anim8or and invert it. Save the object as a new object and convert it as .e and .bin. In Dromed use the new object and set the min and max to whatever values you need below and above 180.

    Edit: In this case you would have to make the top (now the bottom) of the object as the center, so that the object would appear to pivot from that point.
    Last edited by john9818a; 15th Apr 2020 at 00:10. Reason: Added more info

  9. #9
    Member
    Registered: May 2017
    Location: USA
    Quote Originally Posted by Sperry View Post
    ...Using doors could work if I can keep the object count low enough in the rest of my mission.

    ...what about making a rope mesh sway back and forth? How could one achieve this? For context, imagine a climable rope with a heavy crate attached to it (via a particle attachment link I imagine), which must sway from side to side, like a pendulum. Could one achieve this in DromEd?
    The rotating door approach with a COG offset only requires a single object. If you wanted a rope with an object at the end, my door proposal should also work, but you might need to make it into a single object first (not sure on this). The main downside is that it will move at a constant speed, rather than accelerate/decelerate like a realistic pendulum. Is that acceptable?

  10. #10
    Member
    Registered: Feb 2000
    Location: Paris, France
    I'll have to do some tests to find out.

    So far, I've still one question: the door movement is too fast! If I set the speed lower than 0.13, the door simply doesn't move. Is there a way to have a door rotate very, very slowly?

  11. #11
    Member
    Registered: Jan 2001
    Location: Pushing my luck with Dromed
    That sounds like the elevator bug where setting the TPath speed too low prevents them from moving at all. In either case what I think is happening is that the engine is checking the angle/location of the object at a very fast rate (e.g 0.01s, 0.001s etc). At low speeds, the change in angle/location between the two time frames is so small that the engine considers it to be 0. And having a faster processor means those time frames are much closer together. It'll probably work fine on a 400MHz Celeron

    I think the best solution is to make your own jointed object(s). It may not be your preferred choice, but compare that to the time and effort you've been putting in to trying everything else.

    Consider making the pendulum subobject wide and flat and making it reskinable.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •