Hey guys so I’m trying to get 4 cameras to follow my target, one will follow the targets tail(for which I’m already using the default Smooth Follow Script that comes with Unity) the other 3 will follow the target from front, left right. I’ve tried modifying the default Smooth Follow Script so that it would follow the target from the front so but haven’t had any luck with it yet. I’ve pretty much searched all over the net about this as well yet again not really any luck with it so if anyone could come up with a way to do that, that would be WINNING!
create an empty game object and place it to the left with a camera attached pointing in the direction you want. Then make it a child of the object you want it to follow and your done.
Mate if it worked like that then my life would be way more easier lol but unfortunately doesn’t matter where you keep your Gameobject the default follow script will follow the targets tail, but I did try to modify the script so that it will follow the front of the target but that didn’t work so…
If you parented an empty gameobject to the target and positioned it at 0, 0, 0 (so it was at the exact same position as the target), and then rotated it 90 degrees to the right, its “tail” would be to the target’s left. Then if you set the smoothfollow camera to follow that object, it would appear to be following your target from the left.
doesn’t work mate.
Has that worked for you ?
Yeah, I’ve done something like that before. Did you parent the empty gameobject to the target, position it at 0,0,0 and rotate it to point in the direction opposite where you want your camera to face from? (eg: left side camera would need an empty gameobject rotated so the blue arrow points to the parent object’s [the target’s] right)?
And did you make sure to set the SmoothFollow target to the empty child object, not the parent (target)?
Yup I did all that, doesn’t work mate
Everytime I run the script the camera would start on the left side but within a millisecond it’d transfor back to the target’s tail…
Are you setting the camera’s target variable in another script somewhere back to the target in Start()?
No mate I’m not,
I tried this once lol, making the Empty GameObject a Rigidbody attaching the camera to it making the gameobject move the same exact way like the target with the target’s move script that partially worked as a left, right camera but it would mess up at times so I can’t even do that…
Make the camera follow the empty GO’s you place where you want them to target (drag them into the bit where you tell it what you’re wanting them to follow), then make the GO’s children of the main object. It works, no problem, mate.
Wow why didn’t I think of that! That works like a charm! Thanks a lot mate!
That’s exactly what I was saying to do
You didn’t call him mate tho… hehehe.
Oh darn legend my bad, I guess I didn’t really get what you were saying, sorry lol
LOL Frank! <3