With the ability to focus on a group, can this be made to consider the hero/target and the look ahead gizmo as a group to focus on?
Please excuse me if this has been answered or addressed in some way. I couldn’t initially find or correctly use teleporting/warping, and often struggle with the gap between my limited lexicon and that of those able to dream up, design and implement APIs and tools.
Not totally sure what you’re asking here. Seems like two questions.
Focus on a group. Yes, there’s the Target Group camera which can focus on a group of objects, or you can just use the Target Group object by itself and use it with other types of CM cameras. You can set the Composer to ‘look ahead’ when tracking a TargetGroup (or any object) so then you can do what I think? you’re asking here : consider the hero/target and the look ahead gizmo as a group to focus on?
There’s a few other mentions of teleport in the CM forums, best to do a search and see what answers fit your scenario. If none do, please reach out again with some more information.
Can I make the Look Ahead “object” part of the TargetGroup?
By the Look Ahead “object”, I mean the thing drawn in the Game view that’s ahead of the target object or group by the specified amount. It’s a yellow looking dot.
On the teleporting stuff, I’m talking about the fact that I have to ask stupid questions in my narrow lexicon. And that it sometimes takes me some time to sort things out… not a coder. Bit of a clueless git when it comes to the language of programmers.
I eventually found it, but didn’t find the right “tree” of knowledge about it, nor the ways to the fuller tree, so was accessing the warp function through the base component rather than the CM Camera, until Gregoryl set me straight.
No, the composer’s lookahead isn’t a separate object, so you can’t add it to a group. You could make a child object of your target, that implements its own lookahead based on velocity (you could re-use the CM Lookahead code for that, it’s modular enough) and add that child to the group. That would effectively achieve what you’re looking for here.
This is the kind of “tutorial” and insight I desperately needed into using Unity. It’s incredible.
I will learn much and forget more.
Btw, the only folder (in my system) Cinemachine shows up in, with these files, is the one in which I installed the 2D GameKit. I have two projects with Cinemachine installed, both of which have turned it into garbled/obscured file names.
Delete the one that came with the 2D Game Kit. It’s old. Get the latest Cinemachine from the asset store if you’re using 2017, or from the Package Manager if you’re using 2018.
I’m using the one from Package Manager, latest, with 2018.1 b13, but it’s all obscured. Here’s my search results for Predictor.cs, bottom plain english results are in the 2D GameKit project.
Possible quick and easy:
Could I constantly “get” the position of the look ahead thingamebob from CM, move a dummy object to that position each frame/tick, and add the dummy object to a target group with the hero?
I’m only using Package Manager version of latest CM in my projects. I have one, separate, project for checking out the content and coding strategies of what’s in the 2D Game Kit.