#How to freeze position and rotation in Unity Physics?
1 messages · Page 1 of 1 (latest)
i don't know why they've never hooked the baker up to this to work
i think you need to set the InertiaTensor
this one?
i believe you can only set it via the custom authoring or at runtime
oh wait i just saw you highlighted that
i didn't realize that was there
yeah that might work
i don't know, i haven't used rigidbody authoring in a long time
i only use the custom authoring scripts
oh..
this option just through out my platform
as i said, idon't know if this was ever hooked up to the normal rigidbody - it wasn't for a long time but it probably is now
holy moly
however for the record though, i'm not sure there's a way to freeze movement without a custom script in the simulation (probably not that hard)
it might only be possible to freeze rotation
am i just create some force freeze system?
i've never looked too much into it because i haven't had a need, but there are all these injection point systems within unity physics simulation that let you manipulate the simulation
so i'm sure you could stop z movement if you want in there
i can't help you with the correct timing though
unity physics really wasn't designed for 2d sadly which seems to be what you want here
but there are people who make 2d games so maybe they have a better idea
https://github.com/Unity-Technologies/EntityComponentSystemSamples/blob/master/PhysicsSamples/Assets/8. Joints and Motors/Joints - Limit DOF.unity
this is a current way to constrain some axis
if you have small amount of entities it will be fine, I hope you aren't going to constrain millions of tiles of 2d grid-map
maybe just look at the sample
this is a scene with example, pull this repo and open in unity
ok thank you
@brazen badger this one?
yes, this is an example of setup with constrained axis
basically it's a joint but joint to nothing
you can even unparent it (because parenting is shitty thing to have) or create during runtime if you know what to do