14-06-2021, 07:32 AM
(This post was last modified: 14-06-2021, 08:23 AM by josemendez.)
(12-06-2021, 05:10 PM)ReaperQc Wrote: It may be a weird question but, has anybody ever have a problem with the forces applied to a soft body that end up being different in different resolution?
in free aspect, the behaviour is just as i want it, but after trying to create a build, i realise that only my softbody act differently,
in 1920x1080, the force is already less and so forth until in 4k, the force is so small, it doen't jump off the ground at all
Hi there
How (and when) are you applying the force?
Larger resolution = More time spent per frame. Many quantities are time-dependent since they're applied over the length of the current frame, so resolution (among many other things) can affect them. This is the reason why in Unity you need to multiply by Time.deltaTime to get an object to move at the same speed regardless of how much time it takes to render each frame, for instance to move at 10 m/s:
Code:
transform.position += Vector3.forward * 10 * Time.deltaTime;
For a jump, you should be using impulses instead of forces. Forces are applied over time, impulses are instantaneous.
This all applies to Unity's rigidbodies as well (and any other game engine).