- Home /
How do I completely turn off/avoid using the physics engine?
My project is a simulator of Newtonian Physics which in itself is rather simple, but because I am doing it as a qualification project I'm not allowed to use Unity's physics engine as it would make the project too simplistic. I need a way to turn off the physics engine so that I can script my own pseudo-engine and use that instead as it would raise the difficulty of my project. The pseudo-engine would be working out forces of gameobjects in real time and throwing them to a calculation box in the UI space I have already created. As I would be turning off the physics engine I realise I that I won't be able to use the rigidbody component which may also cause problems in the future of my project so any help with that would be greatly appreciated too.
Answer by LilGames · Dec 07, 2017 at 04:28 PM
According to this thread, you can turn it off using:
Physics.autoSimulation = false;
https://stackoverflow.com/questions/46072327/how-to-disable-physics-system-in-unity
But they also say you cannot "remove" the physics classes from loading or being present in the engine. You can just disable them.
@LilGames Thank you, this was extremely helpful, I didn't really need the physics classes to be removed luckily I just need to make sure they weren't being implemented, it doesn't really matter if they are there in the background as long as they aren't doing anything.
And to be extra safe you could check off the entire collision matrix in the Physics settings panel:
https://docs.unity3d.com/$$anonymous$$anual/LayerBasedCollision.html
Answer by meat5000 · Dec 08, 2017 at 02:51 PM
To add an alternative,
Kinematic objects without colliders generally are physics unresponsive, as are objects without Rigidbody.
Manual Collisions detection isnt that hard or demanding.
Your answer
Follow this Question
Related Questions
trouble making a fast projectile 2 Answers
Why are these object passing through each other? 1 Answer
Add velocity relative to ground? 1 Answer
bullets acting weird when spawn 2 Answers