30-10-2025, 02:33 PM
(10-09-2025, 03:28 PM)josemendez Wrote: If you mean velocity = inputDelta / dt, that's wrong (as you figured out). This will just move the object a specific amount relative to its current position, while ignoring changes in velocity due to any other sources (accelerations, forces, etc). A spring will do what you're looking for which is to move it towards an absolute position, while respecting physics.
Hi, I used spring to control rod rotation and it works, but I noticed there are strange little vibrations along the rod and after some tests it looks like spring-damp is the cause.
I used some huge values to make rod responsive (1000 stiff, 100 damp), but overall the problem is that if rod twist compliance has specific values it starts to jump between two rotations, kind of, it oscillates, but very fast. I rotate first 10 particles from the left to desired rotation via angularVelocity and I think this force propagates with lag along the rod and makes it twist like crazy. Do you know what I could possibly do to avoid huge or little oscillations? Do I need to control all particles, because other forces fight here?
I thought about using PID controller,, but by looking at this problem I start to think there will be the same issiue, is there anything reasonable to do here?
Just you know this rod has the same mass everywhere, so it's not caused by different masses and attached images repeat every frame.

