|
Post by icronos on Jan 22, 2023 22:56:14 GMT
Video: Player - Mass(50)
Gray Box - Mass (1)
Orange Box - Mass (50)
Red Box - Mass (100)
I want to prevent rigidbody from pushing one another without changing the mass to ridiculous amount. How do I go about doing that?
|
|
|
Post by axbaby123 on Jan 23, 2023 12:17:08 GMT
Useless but this is ChatGtp's Answer
Q: I am making a video game using the Unity Editor. I want to prevent a rigidbody from pushing another rigidbody without changing the mass. How do I go about doing that?
----CHATGTP Answer
A: One way to prevent a rigidbody from pushing another rigidbody without changing the mass would be to use a fixed joint. A fixed joint connects two rigidbodies together and prevents them from moving relative to each other. To use a fixed joint, you would need to select the rigidbody that you want to prevent from pushing the other rigidbody, and then add a fixed joint component to it in the Unity editor. In the joint's settings, you would then need to specify the other rigidbody that it should be connected to. This will effectively "lock" the two rigidbodies together, preventing one from pushing the other.
|
|
|
Post by Invector on Jan 23, 2023 13:40:42 GMT
You either increase the mass value so it's harder to push or check the IsKinematic to make it fully static
|
|
|
Post by icronos on Jan 23, 2023 22:18:25 GMT
Useless but this is ChatGtp's Answer Q: I am making a video game using the Unity Editor. I want to prevent a rigidbody from pushing another rigidbody without changing the mass. How do I go about doing that? ----CHATGTP Answer A: One way to prevent a rigidbody from pushing another rigidbody without changing the mass would be to use a fixed joint. A fixed joint connects two rigidbodies together and prevents them from moving relative to each other. To use a fixed joint, you would need to select the rigidbody that you want to prevent from pushing the other rigidbody, and then add a fixed joint component to it in the Unity editor. In the joint's settings, you would then need to specify the other rigidbody that it should be connected to. This will effectively "lock" the two rigidbodies together, preventing one from pushing the other. Lol thats one way to keep ones from moving. Shes not wrong
|
|
|
Post by icronos on Jan 23, 2023 22:21:44 GMT
You either increase the mass value so it's harder to push or check the IsKinematic to make it fully static I tried making an external collider with kinematic but quite tricky with more than 1 rigid body attached to each limbs especially when the models have long necks and tails. It does the job for now but feels like its unpolish. Edit: Based on your comment, I decided to try setting up a script to loop everything collider in the body to add rigid body but set everything to kinematic with except for the one with controller and its worked! Thank you!
|
|