Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Scripting rod forces
#25
(Yesterday, 01:40 PM)Qriva0 Wrote: You are right, maybe my last example was just bad.
Consider rod controlled by some input number - starts with 0, then over time goes to 5. Every update rod velocity is upated to: inputDelta / dt.

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.

(Yesterday, 01:40 PM)Qriva0 Wrote: Overriding velocity ignores mass of particle, and when I used external forces I divided force by mass inversed to account that.

That's the same as doing velocity += value * time.

(Yesterday, 01:40 PM)Qriva0 Wrote: The problem with controling velocity was that I use huge solver damping and result is affected by that.
In any case I talked about previous setup, and it was not spring, but plain (velocity+= or velocity=).

Damping reduces velocity in the simulation every timestep, so that it tends to be zero after some time. This should be easy to overcome by just increasing the stiffness of your spring force.
Reply


Messages In This Thread
Scripting rod forces - by Qriva0 - 08-08-2025, 06:33 PM
RE: Scripting rod forces - by chenji - 11-08-2025, 03:18 AM
RE: Scripting rod forces - by josemendez - 11-08-2025, 08:31 AM
RE: Scripting rod forces - by Qriva0 - 11-08-2025, 11:14 AM
RE: Scripting rod forces - by josemendez - 11-08-2025, 11:26 AM
RE: Scripting rod forces - by Qriva0 - 11-08-2025, 12:25 PM
RE: Scripting rod forces - by josemendez - 11-08-2025, 12:48 PM
RE: Scripting rod forces - by Qriva0 - 11-08-2025, 03:24 PM
RE: Scripting rod forces - by Qriva0 - 25-08-2025, 11:30 AM
RE: Scripting rod forces - by josemendez - 25-08-2025, 12:12 PM
RE: Scripting rod forces - by Qriva0 - 25-08-2025, 02:11 PM
RE: Scripting rod forces - by josemendez - 25-08-2025, 02:36 PM
RE: Scripting rod forces - by Qriva0 - 25-08-2025, 03:59 PM
RE: Scripting rod forces - by Qriva0 - 08-09-2025, 04:01 PM
RE: Scripting rod forces - by chenji - 09-09-2025, 02:46 AM
RE: Scripting rod forces - by Qriva0 - 09-09-2025, 09:56 AM
RE: Scripting rod forces - by chenji - 09-09-2025, 10:07 AM
RE: Scripting rod forces - by josemendez - 09-09-2025, 02:18 PM
RE: Scripting rod forces - by Qriva0 - Yesterday, 09:39 AM
RE: Scripting rod forces - by chenji - Yesterday, 10:02 AM
RE: Scripting rod forces - by josemendez - Yesterday, 10:25 AM
RE: Scripting rod forces - by Qriva0 - Yesterday, 11:48 AM
RE: Scripting rod forces - by josemendez - Yesterday, 12:06 PM
RE: Scripting rod forces - by Qriva0 - Yesterday, 01:40 PM
RE: Scripting rod forces - by josemendez - Yesterday, 03:28 PM