Hiyal, I have 16 places on my terrain map. How can I make my camera fast travel to these 16 locations by entering “1-16” on my keyboard?
Cheers,
Hiyal, I have 16 places on my terrain map. How can I make my camera fast travel to these 16 locations by entering “1-16” on my keyboard?
Cheers,
Do I use some kind of teleporter system perhaps? uh huh uh huh
Why don’t you just position the camera to those preset locations?
.
Hmm, I am digging your response. So simple and elegant-- currently I have the camera on dude’s head. Do I just add a bunch of extra cams?
Cheers,
Maybe next time you can say that you have a camera on a dude’s head instead of “can i make my camera fast travel to 16 locations”
.
Maybe next time you can be more polite.
I just cannot be-lieve the level of disparity between forums. Working with excel I get five star help seconds after I pose my question. Working with Unity I’ll be lucky to get a response.
We’re programmers, and every post here is basically asking us to stop our work and do someone else’s for them (that’s an extremely cynical look, but eh, close enough).
When your post doesn’t show evidence of what you’ve tried or how it didn’t work, it’s … disheartening.
Do you know about arrays? The Input class? Transforms? Unity-specific functions? Have you worked through any tutorials? It’s hard to tell from your post.
It’s a reasonably simple answer, but the problem is, if you don’t understand it then I’m not really helping.
var fastTravelLocations : Vector3[];
function TeleportTo( index : int ) {
transform.position = fastTravelLocations[index];
}
private var currentInput : String;
function Update() {
currentInput += Input.inputString;
try { // parseint can throw
if ( parseInt( currentInput ) < fastTravelLocations.length ) {
TeleportTo( parseInt(currentInput) );
} else {
currentInput = "";
}
} catch ( e ) {
currentInput = "";
}
}
You can make it with a script that declares an array of game objects. Assign the script to a main empty game object, and then place 16 empty gameobjects in the terrain, where you want the character to appear (targets). From the editor set the size of the array for 16 entries and assign each target to a field. In the OnGUI event of the script create a textfield or popup to select the target’s index, and when the user selects an option assign the transform.position of the given target to you character. If you are new to programming each detail will take some time to learn, but you will finally make it.
It’s not working with Unity that’s your problem; it’s people like you with your attitude. Your sarcastic reply to the first post is enough to turn people off, but when I inferred that you should be more specific with your questions and you reply that I should be more polite… well, I can’t help but laugh at people’s sense of entitlement nowadays. Unity is a serious tool for serious people that, due to it being free and the nature of our internet age, is unfortunately downloaded and used by everyone and their grandmothers who have dreams and aspirations far beyond their talents and who beg on the forums for others to do what they’re incapable of doing themselves. I’m sure if they gave away nuclear reactors for free every joe schmoe will want one and light up the nuclear physics forums with their stupid questions : “How do I get energy out of this thing? What button do I press? What happens when I pull this lever? Would someone help me get this reactor to power my ps3?” Whatever happened to good old fashioned studying? Just like you need to know some basic nuclear physics before posting on a nuclear physics forum, you need to know some basic unity/scripting concepts before posting here, at which point we’ll consider you a peer and not a leper. At that point feel free to ask away, but if you persist on being a smart-ass when someone is simply trying to help then the Excel forums are one click away.
.
Yeah but consider for a moment if my observations are correct. I’m taking the time to point out that (most) people on this forum are oblivious to courtesy. And that’s okay, I think it has something to do with programming unity. It’s hard and probably people don’t have any sentience left at the end of the day to share with others. Let me tell you that I was so pleased when I went to a forum on Excel to ask my questions that the whole experience was therapeutic. It granted me a +4 circumstance bonus to computing it was so awesome.
Anyhow, there’s no way around it I suppose I have to get back to scripting if I want to advance working with unity. And they thought lobotomy was a bygone practice.
Cheers,