Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obi Softbody actor as child of physics game object (Untiy)
#1
Hello.

I'm working on a unity project where the player character is a bouncy ball and uses unity physics/ ridged body to bounce. 

I'm trying to add the actor as a child of the already existing player controller to separate the game logic and character visuals. 

My problem is that the actor does not stick with its parent as a normal child game object would. 

I'll include a gif showing what I'm talking about as well as images showing the player hierarchy and the Obi solver and actor settings. The in the player gameobject.

If anyone could help me out that would be brilliant. 

Thanks in advance.

[Image: giphy.gif]


Attached Files Thumbnail(s)
           
Reply
#2
(03-12-2022, 05:39 PM)Moon_Hermit Wrote: Hello.

I'm working on a unity project where the player character is a bouncy ball and uses unity physics/ ridged body to bounce. 

I'm trying to add the actor as a child of the already existing player controller to separate the game logic and character visuals. 

My problem is that the actor does not stick with its parent as a normal child game object would. 

I'll include a gif showing what I'm talking about as well as images showing the player hierarchy and the Obi solver and actor settings. The in the player gameobject.

If anyone could help me out that would be brilliant. 

Thanks in advance.

[Image: giphy.gif]

Hi!

Parenting a dynamic object to another dynamic object works this way  -regardless of them being rigidbodies or softbodies- because parenting is a kinematic relationship: if you parent a rigidbody to another rigidbody in Unity they will also move independently.

Your character must either be a rigidbody or a softbody, parenting a softbody to a rigidbody doesn’t make any sense whatsoever. See the “ObstacleCourse” sample scene for an example of a player-driven soft sphere. If you really want to approach it this way, what you probably want in this case is to use attachments. See: http://obi.virtualmethodstudio.com/manua...ments.html

kind regards
Reply
#3
Hello

Thanks for the response. Once I started thinking about the softbody as another physics object everything made sense. Honestly, I'm amazed I didn't clock that on my own. I've since recreated the player behaviour using softbody instead of ridgedbody and it's working brilliantly.

Thanks again.
Reply
#4
(04-12-2022, 03:45 PM)Moon_Hermit Wrote: Hello

Thanks for the response. Once I started thinking about the softbody as another physics object everything made sense. Honestly, I'm amazed I didn't clock that on my own. I've since recreated the player behaviour using softbody instead of ridgedbody and it's working brilliantly.

Thanks again.

It's not uncommon to think of softbodies as just "jiggling around the vertices of a rigidbody", some assets do just that indeed and in that case it would make sense to think of them as an additional layer on top of a rigidbody.

A proper softbody however is a first-class citizen with its own mass, inertia tensor, velocity, etc: just like a rigidbody, but soft. Sonrisa

kind regards,
Reply