Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About Moving?
#3
It's normal to use "addforce" in "editor" to move, but in "mobile", it's normal at the beginning, and then "addforce" gradually becomes invalid for the second or third time. Sometimes it moves in the opposite direction, sometimes it doesn't move directly. I make sure that the direction I apply to "softbody" is the same, but I feel affected by an inexplicable reverse force.

I found the [font=宋体, monospace]solver.velocities [/font]it would go back to zero automatically?

and can i use change [font=宋体, monospace]velocities.x to make the item move?[/font]

(27-02-2021, 09:56 AM)josemendez Wrote: It’s hard to tell just by looking at that code. However, the code doesn’t make a lot of sense to me:
You’re adding moveDirection * moveSpeed to direction, but you’re then normalizing it. This will make direction a vector of unit length, but then you multiply it by moveSpeed a second time.

No need to do the first multiplication if you’re normalizing the vector afterwards, as it will be unit length anyways. I don’t see anything that would reverse the movement direction though. Can you post the full code?

the code here,i just change some code with the obi demo.


.cs   SoftbodyController.cs (Size: 6.25 KB / Downloads: 8) code here
Reply


Messages In This Thread
About Moving? - by zero16832 - 27-02-2021, 09:15 AM
RE: About Moving? - by josemendez - 27-02-2021, 09:56 AM
RE: About Moving? - by zero16832 - 27-02-2021, 10:17 AM
RE: About Moving? - by josemendez - 28-02-2021, 07:04 PM
RE: About Moving? - by zero16832 - 01-03-2021, 02:17 AM
RE: About Moving? - by josemendez - 01-03-2021, 01:26 PM
RE: About Moving? - by zero16832 - 02-03-2021, 02:12 AM
RE: About Moving? - by zero16832 - 02-03-2021, 09:46 AM
RE: About Moving? - by josemendez - 02-03-2021, 09:54 AM
RE: About Moving? - by josemendez - 02-03-2021, 11:59 AM
RE: About Moving? - by josemendez - 02-03-2021, 12:23 PM
RE: About Moving? - by josemendez - 02-03-2021, 01:54 PM
RE: About Moving? - by zero16832 - 02-03-2021, 02:42 PM
RE: About Moving? - by josemendez - 02-03-2021, 02:44 PM
RE: About Moving? - by zero16832 - 02-03-2021, 03:11 PM
RE: About Moving? - by zero16832 - 03-03-2021, 02:11 PM
RE: About Moving? - by josemendez - 03-03-2021, 02:28 PM
RE: About Moving? - by zero16832 - 03-03-2021, 02:38 PM
RE: About Moving? - by josemendez - 03-03-2021, 02:44 PM
RE: About Moving? - by zero16832 - 03-03-2021, 02:52 PM
RE: About Moving? - by josemendez - 03-03-2021, 02:53 PM
RE: About Moving? - by zero16832 - 03-03-2021, 03:00 PM
RE: About Moving? - by josemendez - 03-03-2021, 03:05 PM
RE: About Moving? - by zero16832 - 03-03-2021, 03:12 PM
RE: About Moving? - by josemendez - 03-03-2021, 03:18 PM
RE: About Moving? - by zero16832 - 03-03-2021, 03:34 PM
RE: About Moving? - by josemendez - 03-03-2021, 03:44 PM
RE: About Moving? - by zero16832 - 04-03-2021, 09:50 AM
RE: About Moving? - by josemendez - 05-03-2021, 10:38 AM
RE: About Moving? - by zero16832 - 05-03-2021, 02:18 PM
RE: About Moving? - by josemendez - 05-03-2021, 02:39 PM
RE: About Moving? - by zero16832 - 05-03-2021, 03:32 PM
RE: About Moving? - by josemendez - 05-03-2021, 03:41 PM
RE: About Moving? - by the-lander - 01-03-2021, 08:23 AM
RE: About Moving? - by josemendez - 01-03-2021, 09:01 AM