Obi Official Forum
Screen Resolution - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Softbody (https://obi.virtualmethodstudio.com/forum/forum-12.html)
+--- Thread: Screen Resolution (/thread-2976.html)



Screen Resolution - ReaperQc - 12-06-2021

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


RE: Screen Resolution - josemendez - 14-06-2021

(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).


RE: Screen Resolution - ReaperQc - 14-06-2021

(14-06-2021, 07:32 AM)josemendez Wrote: 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).


As simple as that, that was a simple question,  thank you, now i just need to figure out why my solver detect collision with collider even if it is a few meter away


RE: Screen Resolution - josemendez - 14-06-2021

(14-06-2021, 03:50 PM)ReaperQc Wrote: As simple as that, that was a simple question,  thank you, now i just need to figure out why my solver detect collision with collider even if it is a few meter away

Quoting the manual:

http://obi.virtualmethodstudio.com/manual/6.1/scriptingcollisions.html

Quote: Obi uses a continuous-collision detection method known as speculative contacts, which can generate contacts even when an actual collision isn´t taking place. If you want to prune all speculative contacts and consider actual collisions only, check for distances below a small threshold (e.g 0.01).