I want to get a script for a physics based shooter. and I’ve got most of it sorted but i currently am stuck on a part of code where i want to be able to left click on an object i am looking at in the center of screen to be “selected”
It would come to the center of screen in front of me.
I already have the code for it to move towards the screen but I’m not sure how i would be able to select any object with rigid body to become referenced in the script
If that isn’t easily understandable.
I want a public variable that when i click on an object its transform will become saved into a script in a transform variable.
If i could get a solution in Java that’d be good but i can deal with c#