Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About Moving?
#21
(03-03-2021, 02:38 PM)zero16832 Wrote: i have send your in email yesterday?

Do you mean the original project you sent? That's what I tested in all these Unity versions, but was unable to reproduce any issues (except for 2020.2) I posted here a video of the results.

Using the Burst backend or disabling interpolation should work in any version, though.
Reply
#22
(03-03-2021, 02:44 PM)josemendez Wrote: Do you mean the original project you sent? That's what I tested in all these Unity versions, but was unable to reproduce any issues (except for 2020.2)
do  you have wechat,discord or Telegram?
Reply
#23
(03-03-2021, 02:52 PM)zero16832 Wrote: do  you have wechat,discord or Telegram?

Nope, I only offer support through the forum or the support email. No exceptions, sorry.

I will later test the project on the exact same Unity version you reproduced the error in and report back the results.
Reply
#24
(03-03-2021, 02:53 PM)josemendez Wrote: Nope, I only offer support through the forum or the support email. No exceptions, sorry.

I will later test the project on the exact same Unity version you reproduced the error in and report back the results.
OK, i will make the other demo send your.

other problem: I want my softbody keep move,how can i to do that?

i test like that(on update function):

Code:
for (int i = 0; i < softbody.solverIndices.Length; i++)
{
    float xVelocitie = softbody.solver.velocities.x;
    xVelocitie -= xOffsetAdd;
    if (xVelocitie < -maxSpeed)
    {
        xVelocitie = -maxSpeed;
    }
    softbody.solver.velocities = new Vector4(xVelocitie, softbody.solver.velocities.y, softbody.solver.velocities.z, softbody.solver.velocities.w);
}


The problem is that it's too inefficient。Do you have any suggestions?
Reply
#25
(03-03-2021, 03:00 PM)zero16832 Wrote: OK, i will make the other demo send your.

other problem: I want my softbody keep move,how can i to do that?

I'm not sure I understand what you're trying here... unless your floor has friction or you're using velocity damping, or some other external force is slowing the softbody down, it should simply keep moving once you've added a force/acceleration to it.

This already happens in the game: once I press the screen the softbody just keeps moving forward even after lifting the finger, as no forces are acting to slow it down.

Is this what you want? in that case, there's no need to do anything in Update(). Inertia will keep the softbody moving. If you want the softbody to have a "base" velocity, just giving it an impulse at the start is enough. Again, assuming there's nothing slowing it down.
Reply
#26
(03-03-2021, 03:05 PM)josemendez Wrote: I'm not sure I understand what you're trying here... unless your floor has friction or you're using velocity damping, or some other external force is slowing the softbody down, it should simply keep moving once you've added a force/acceleration to it.

This already happens in the game: once I press the screen the softbody just keeps moving forward even after lifting the finger, as no forces are acting to slow it down.

Is this what you want? in that case, there's no need to do anything in Update(). Inertia will keep the softbody moving. If you want the softbody to have a "base" velocity, just giving it an impulse at the start is enough. Again, assuming there's nothing slowing it down.
It's my fault. I've got friction on the floor。

other question it:

How can I limit softbody speed(use addForce)?

How can I slow down the softbody speed?
Reply
#27
(03-03-2021, 03:12 PM)zero16832 Wrote: How can I limit softbody speed(use addForce)?

How can I slow down the softbody speed?

You can just clamp the velocity of each particle, same if you want to slow it down (by multiplying it by something smaller than 1, say 0.8)

Don't be afraid to iterate over all particles in the body and set their velocities, internally Obi does this literally dozens of times per frame (albeit using multithreading). Doing it in the main thread is slower, but there aren't enough particles in your softbody for this to have an impact on performance.
Reply
#28
(03-03-2021, 03:18 PM)josemendez Wrote: You can just clamp the velocity of each particle, same if you want to slow it down (by multiplying it by something smaller than 1, say 0.8)

Don't be afraid to iterate over all particles in the body and set their velocities, internally Obi does this literally dozens of times per frame (albeit using multithreading). Doing it in the main thread is slower, but there aren't enough particles in your softbody for this to have an impact on performance.

brust and oni Which is more efficient

(03-03-2021, 03:34 PM)zero16832 Wrote: brust and oni Which is more efficient
I try to use brush and open inter in xiaomi 8,it FPS is too low
Reply
#29
Burst should be slightly more efficient in all cases, although not by a large margin. It uses Unity's Burst compiler and job system, and part of the data-oriented technology stack (DOTS) See: https://unity.com/dots

If running Burst in editor, make sure you disable the Job debugger as explained in the manual. Performance will be extremely low otherwise:
http://obi.virtualmethodstudio.com/tutor...kends.html

On a device, Burst's performance should be slightly better than Oni's. That's why Burst is the default backend, only if you don't have the required dependencies installed the engine will fall back to Oni.
Reply
#30
(03-03-2021, 03:44 PM)josemendez Wrote: Burst should be slightly more efficient in all cases, although not by a large margin. It uses Unity's Burst compiler and job system, and part of the data-oriented technology stack (DOTS) See: https://unity.com/dots

If running Burst in editor, make sure you disable the Job debugger as explained in the manual. Performance will be extremely low otherwise:
http://obi.virtualmethodstudio.com/tutor...kends.html

On a device, Burst's performance should be slightly better than Oni's. That's why Burst is the default backend, only if you don't have the required dependencies installed the engine will fall back to Oni.
thx for your help!

other question it: when i move the softbody use (addforce) or (change the softbody.solver.velocities) the softbody shaking a lot. why?
Reply