#Reduce how much my RigidBody2D push each others.
15 messages · Page 1 of 1 (latest)
even if you go really high?
😄 yea, ok
i guess the only thing i can think of then is to add some custom logic that applies a counter force while pushing... but that wouldnt work in your case either since you are overwriting the velocity each frame so forces probably wont have any effect
exactly what i was thinking
its an interesting dilemma you have here tbh 😄
what about increasing the players mass futher but adding linear damp to the slime?
does that have any effect?
doing this with scripting just brings up so many questions or edge cases that need to be solved.
the only physics way i can come up with is really weird:
fix another invisible rigidbody to the slime with a pinjoint for example. make that rigidbody pushable by the player but not pushing the player by removing its collision mask
not sure the result would be stable in all cases, if it works at all
also the combined masses might still be taking into account when pushing the player, so there may just be no difference
you are welcome, i like this game physics stuff
i just tried applying something like this to a pushing character demo project i have but i cant get it to work even to the point of the rigidbody scenario
as soon as they are pushing against eachother they will just stop. i guess it should be possible to solve this with some fancy custom logic but at this point its probably easier to write custom logic for the rigidbodies to tweak the little bit thats missing instead of implementing full bilateral pushing for characterbodies
i'll certainly let you know if i can come up with another idea. for now, i guess my suggestion would be using rigidbodies and write some logic that determines whois the pusher by comparing velocity vectors and positions and apply some factor to the velocities from there