What is the most efficient way to switch between primary and secondary and other weapons in an fps game? Keep in mind that each weapon is not just a mesh, each weapon has a series of like 4-5 parent objects for animations and other things.
You could use a simple script to make them inactive, and just simply have all the weapons you need on hand, and make only one set active. This way, the weapon could have it’s own scripts for firing and animation and stuff like that, but only have the script call on the active weapon.
A simple way to call a weapon to fire is to simply send it a message that says “fire” the weapon would keep track of when it can fire next, and if it can fire, and what it all looks like when firing. You can even have the weapon send “feedback” to the fps to get him to rear back from the recoil.
So how can i enable/disable a whole set of objects and child objects? Cause i tried enabling/disabling the scripts individually once for an attempt at a vehicle, and it slowed it down WAYYYYY to much and there was nothing in the scene other than the player and a cube
Oh ok, i had seen that once before but i didn’t really pay attention to it. Thank you