- Home /
To Use or Not to Use 3D Physics in 2D Game
I have a lot of scripts written for a 3D game that would be useful in a 2D game, and I really don't want to reinvent the wheel to add them to that game. So my question is, can I use my current 3D game scripts (with Vector3s and calls to Physics.Raycast(), Physics.Gravity, etc.) in a 2D game (where all the GameObjects have 2D components like Collider2D and Rigidbody2D and there will be other scripts using calls to Physics2D.Raycast(), Physics2D.Gravity, etc.)? I'm guessing that I can do it but that it will be stupid inefficient, so I might as well re-implement with 2D classes, but figured I'd ask first.
Thanks in advance!
Answer by tanoshimi · May 03, 2016 at 05:39 AM
You can do it - the two systems don't interact and won't interfere with each other, but clearly any given object in your scene can only either be under the influence of one or the other.