I’m very new to Unity3d. I’m coming from using Quest3d which I had to abandon due to lack of browser support and such.
I have limited knowledge of java/as3 coding so this will be a much harder transition for me. My projects are usually walking around an environment then clicking on an entrance sign to switch to a different scene or clicking on a board to launch a web browser. Will I need heavy scripting to achieve this or are there any premade assets I could use. I’d also like to understand the object viewing capabilities, I tried the mouseorbit but it orbits only with mouse movement without requiring holding down the mouse key, is there a way around this?
Sorry for being such a noob but after using the search a few times I started to realize most of postings were already a bit too advance for me. If anyone could point me in the right direction I’d appreciate your time and effort. Thanks and enjoy your weekend all.
Hey, welcome over to Unity!
I too came from Quest, due to ease of use with Unity, which I could not find with Quest.
I am not a scripter either, more the artist type.
For moving around your 3D environment, drag the First Person Controller from the PreFab Folder of the Standard Assets folder of your Unity project into the Hierarchy Panel. This will create (yep) a player to move around your scene.
To move between scenes (levels) create a scene and save it, open the Build Settings under File and click the Add Current button.
Create a new scene, save with your given name and add that to the build dialog.
Now you have both scenes referenced from both scenes.
In your first scene create an object and add the script (create a javascript file, click Create in the top of the Project Panel and choose JavaScript, paste the following text into the new js file):
function OnTriggerEnter(whatHitMe:Collider){ //detects it has been touched
Application.LoadLevel (“YOUR SCENE NAME”); // loads up the level
}
…
Select js Trigger in the object properties in the Inspector Panel under the collider section.
Now, when the player object collides with the object that has the js on it, if you have the other scene name between the quotes, it will put you in the other scene.
Just a note:
If you want to go back to the other scene, create a new js file, save it under another name, put the name of the first scene in the quotes, put it on an object in the second scene, select js Trigger and when you collide with the object you will be returned to the first scene.
This is very simple once you get used to it.
I got the script somewhere around here.
I am very dysfunctional with scripting but I can drag a script onto an object.
Have fun!
Don
PM me if you have any questions,
I’ll help as much as I can.
Haven’t done anything with the opening of a web browser, but I doubt it will be hard.
Thanks for the quick response and help. I will give it a shot later tonight and keep you posted. How about the object viewer? I dropped the mouseorbit on the camera but it moves immediately with the mouse, is there a way to make it click and drag instead of moving solely on mouse movement?
I have some text that can be put into the MouseLook script to stop rotation of the view by right clicking and restarting rotation by right clicking again, but not really sure where to put it in the MouseOrbit script or if it is correct for that script.
I’m sure if someone stops by that knows what they are doing they can set it up for you.
The MouseLook script is what is used with the FPC (First Person Controller) camera.
basically I add a switch that only turn on the camera orbit or look script when certain button is pressed down, in my case left mouse button, it works quite well for me
its very simple , if you guys still need it , I can post it here.
you can easily make it work with MouseOrbit, just relace the componet name.
If you applying this to the FPS prefeb, remember to asign the script to both the parent controller and the camera inside, as they both have the mouselook attached.
Got a friend at work to help me figure out the left click, it was OnMouseDown() replacing the trigger in your code. I still need a mouse wheel zoom going to run another search and see what I come up with.
Yes I am making some progress, your help gave me a head start. Now I just need a mouse wheel zoom for my object inspector and I need something to turn a 3d models visibility On and Off.
Sure it will if it’s not your forte.
If you are not getting the input in the amount of time you wish, you could post a topic asking for help on a paid basis. If this is a possibility for you.