Sperry on 26/3/2020 at 20:00
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.
R Soul on 26/3/2020 at 22:13
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:
Inline Image:
https://i.postimg.cc/MZMBqgyb/image.pngThe 'pendulum' flag smooths out the swinging.
Attached object (locking bar from the bank) DetailAttachement link:
Inline Image:
https://i.postimg.cc/66mhhdhz/image.png
DirkBogan on 27/3/2020 at 00:14
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.
trefoilknot on 27/3/2020 at 00:29
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.
R Soul on 27/3/2020 at 21:13
Quote Posted by DirkBogan
...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.
john9818a on 28/3/2020 at 01:24
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.
Sperry on 14/4/2020 at 08:39
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?
john9818a on 15/4/2020 at 01:25
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.
trefoilknot on 15/4/2020 at 03:59
Quote Posted by Sperry
...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?
Sperry on 17/4/2020 at 12:28
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?