Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
It's just a phase, mom!
#2
(21-03-2021, 02:44 PM)the-lander Wrote: Hello!

I have two questions about phases.

1. Is there a way to get a phase of an ObiActor? I know I can set one via SetPhase() and I think I can get a phase of a ObiCollider, but what about softbodies?

2. Can I adjust phases like physics collision layers in Unity? Here's why do I need this:
  • I need my softbody player to roll through the level, so I apply torque.
  • I need the player to push other similar sized softbody opponents like they're nothing, like a golf ball pushes table tennis balls. But as I apply torque, instead of pushing, player climbs over them. Setting all frictions to zero doesn't help. Reducing opponents masses makes things worse.
  • So I've attached a sphere with ObiCollider to my player.transform as a child and got it player's phase. Now the sphere does the pushing, but I need to prevent player from interacting with the opponents. But I need opponents to be able to interact with each other.
Thank you )

1.- No, since phases are specified per-particle. It's perfectly fine to have part of the actor in phase 2, another part in phase 3, and the rest in phase 6, for instance. So you can set the actor's phase, and it will set all particles to that phase. There's no GetPhase() for actors tough, as often there's multiple phase values. Note you can both get and set phases per-particle using the particle API:
http://obi.virtualmethodstudio.com/tutor...icles.html

Unlike ObiActors, ObiColliders are not composed of smaller entities so the entire thing can only have one phase value.

2.- Mass should do the trick here: if the player mass is larger than the opponents, it should push them around easily. If there's no friction between them, they should slide on contact and the player would not "climb" on top, so in theory this should work. Could you share more details about this?

3.- Should not be needed to attach a collider to an actor, since particles already do collision detection/response.
Reply


Messages In This Thread
It's just a phase, mom! - by the-lander - 21-03-2021, 02:44 PM
RE: It's just a phase, mom! - by josemendez - 22-03-2021, 10:35 AM
RE: It's just a phase, mom! - by the-lander - 22-03-2021, 12:01 PM
RE: It's just a phase, mom! - by josemendez - 23-03-2021, 09:16 AM
RE: It's just a phase, mom! - by the-lander - 24-03-2021, 08:54 PM
RE: It's just a phase, mom! - by josemendez - 25-03-2021, 08:37 AM
RE: It's just a phase, mom! - by the-lander - 26-03-2021, 08:50 PM