![]() |
About Moving? - 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: About Moving? (/thread-2771.html) |
RE: About Moving? - josemendez - 03-03-2021 (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. RE: About Moving? - zero16832 - 03-03-2021 (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? RE: About Moving? - josemendez - 03-03-2021 (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. RE: About Moving? - zero16832 - 03-03-2021 (03-03-2021, 02:53 PM)josemendez Wrote: Nope, I only offer support through the forum or the support email. No exceptions, sorry.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++) The problem is that it's too inefficient。Do you have any suggestions? RE: About Moving? - josemendez - 03-03-2021 (03-03-2021, 03:00 PM)zero16832 Wrote: OK, i will make the other demo send your. 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. RE: About Moving? - zero16832 - 03-03-2021 (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.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? RE: About Moving? - josemendez - 03-03-2021 (03-03-2021, 03:12 PM)zero16832 Wrote: How can I limit softbody speed(use addForce)? 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. RE: About Moving? - zero16832 - 03-03-2021 (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) brust and oni Which is more efficient (03-03-2021, 03:34 PM)zero16832 Wrote: brust and oni Which is more efficientI try to use brush and open inter in xiaomi 8,it FPS is too low RE: About Moving? - josemendez - 03-03-2021 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/tutorials/backends.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. RE: About Moving? - zero16832 - 04-03-2021 (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/dotsthx 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? |