Hey I know it is 5 years old but people still watch this so if you think this may be useful pin this, it is a way to get the mesh collider on the non kinematic object: First you make the collider where you want it, then you copy it and paste it onto an empty game Object that has no parents. On the same object you make the following script: public GameObject mesh; public GameObject followedObject; void Update() { mesh.transform.position = followedObject.transform.position; } Where mesh is the gameObject you just made (this can of course be left but maybe you want to move another mesh, or you have this script on another object) and FollowedObject is the object that actually is the visible thing in the scene. In my project I use this to have my player walk on the ship, but if you enable gravity and disable freezing it would obviously fall, yes. But then you can just add a child to the ships bottom that then is the collider for the gound
That was great. Your casual description of accessing components from scripts was a big "Aha!" moment. I've been following unity tutorials and copying syntax without realizing what exactly I was doing... until now. Thanks!
1. All physics update must go in FixedUpdate() 2. Input.GetKeyUp(KeyCode) would be a better choice for switch functionality 3. Buoyancy would add a nice touch too. Still a nice tut. Have been geeking out on your vids all day, Hibby. Way to go, man.
very nice, your are my first teacher in unity, i am not good at English, but your tutorial is outstanding , I can actually know what you are talking about , it's very clear and Understandable, thank you very much.
anyone that doesn't get a reply from me: make sure your google plus settings are set to allow replies on your comments, some people don't have a reply button under their comments
+F Campbell thanks! I don't own google cardboard, I should probably look into that, I don't own a smartphone, I do have an ipod touch that might work with it
oh - you don't need a smartphone and you don't need google cardboard. It is an sdk for free online and you can see /test it on your laptop. Just like any build.
+Aaron Gibbered You are too funny. ,...do you have an email address or is there a way to ask or reimburse you for your time on something that is within the calibre of the boat and i'd like to figure out or solve somehow? (fingers crossed!) fhcampbell.nyc at g mail period com
Great tutorials bro! Learning alot from you and I appreciate all your work here!!! New sub here and looking forward to watching a few more of your tutorials!!!
Hi i am trying to do this myself, using this tutorial. I have a problem at around 13:30 in the tutorial. When i run my program, the player falls through the bottom of the boat and ends up in the ocean behind the boat. Any ideas?
+Henrik Krüger hmmm, both the boat and player have colliders? The colliders are not set to 'is Trigger', and they look correct from every angle? you could click 'Show More' and download the project to compare and see what's different
Strange, Aaron the Unity lets choose the color, it appears in the color box I choose it is accepted in the shader but it is not going to pro project.so this went wrong the rest you taught it was cool. Only the water does not stay cool.
I have a problem about switchmode. FPSController comes to the deck when I hold down the button but it returns to its local position when I release the button.
How can I improve the code so that the boat jumps ramps? I placed a ramp and added it a "slippery" physic material, but the boat collider got stucked when I drove it to the ramp
my friend how did you be able to preview both render game compile and viewport work space in single time ? are there any functionality there in unity somewhere or you just do something can be said combined screnshots somehow , as far as i know unity does not have any onscreen compile game as well workable viewport in one time as well, btw nice teaching
Hi, I am just getting started. I am looking for a way to switch player modes from my character hero guy walking around (third person view) and switch to (first person view) walking/running/standing but then also getting in/out of his jeep (with 1st person looking through windscreen and third person camera just following the car as he drives around. A tut on that would be greatly appreciated. C# scripts please. Part of the problem I am trying to learn is how to do this right with mechanim animations.
I am working on a VR project and instead of the FPS Player controller I am using the OVR Player Controller. I need the water deeper, like the ocean, so I added a float script to make the boat float. But when i place my ovr player controller on the boat, it collides with the boat and falls down and the boat keeps rotating. How do I make it work in a deep water??
+Taylor Moore Thanks. It might work right away if you just create > new 3d object > Cube, and then make the cube big and rotate it on an angle to drive up. I would probably give the collider on the cube a physics material, and set its friction and bounce settings to 0 and minimum combine, so the boat can go smoothly up it
hai... i want quiz script for dragging the answer button to correct position of the model parts... please help me from this problem...if it wrong it get red color and goes to correct position and turns to green......
+xCONDOGZz I don't think Unity has a good water physics, you would have to fake it, like there isn't actually any water, you would just be floating in empty space and the background is all blue, or the camera has an effect on it so it looks like you're in the ocean. You could use the particle system to make bubbles. There might be some physics effects you could make to be like water currents too
Aaron My Boat is not moving also i watched your other tutorial of chaarcter animation in which also the chracters has all physics but unable to move with map in game play plz help !
Aaaand subscribed..Great video!! I am waiting for my new gaming laptop then I will be tinkering with this but I want to use a bit better graphics, I have a lot to learn but I have some basic programming knowledge that has just started coming back to me haha. I used to be pretty decent in Photoshop, and my wife is a wizard in coral draw :P. Anyway I'd really enjoy learning to make my wife's kids and our son their own video games. User friendly, and only the content I feel they should have access to. What a fun way to do what you love and make the things our children see a little more kid friendly. I want to make free games and use the ad campaign to make side cash. Not looking for profit though, one day if i get good enough, I might get noticed by some renown company for a job opportunity. I like that you are going at a human pace and not a quantum speed, and you seem like a pretty chill dude. Thanks for these videos, I look forward to watching more and hopefully my excitement doesn't betray me!
Aaron Hibberd Thats what i was leaning to start out with, then I can have the kids be my little testers. Kids have a habit of being brutally honest lol.
Hi Aaron Hibberd I want to make 4 buttons for this game, one for left and one for right and one for accellerate speed and the last one for stop the boat.
Love the tutorial, Got question thou I made it to where i start out NOT in boat So when u hope in the boat an drive around then get out it spawns me Back the the spot i got in the boat an the boat is left WAY over where it was lol Any idea how to fix this?
Can you make an Update-Video? Also I have the problem, when I don´t tick the "Use Gravity", my boat doesn't move, but when I tick it, my boat moves very faulty in the curves.
+Taylor Griffin you can use mesh colliders, but they have to be convex if they are going to collide, and they weren't convex on that boat model without filling in holes and making a big weird shape that I didn't want. something to do with how it was modelled docs.unity3d.com/Manual/class-MeshCollider.html
+Taylor Griffin I'm not sure, but for me he was falling through the boat when I used it's mesh collider, and on the Unity documentation it says "Mesh Colliders that are marked as Convex can collide with other Mesh Colliders". So I guess that's a question for the Unity developers
hi, i tried doing the switchmode.cs script BUT unity only says : Assets/scripts/switchMode.cs(35,31): error CS0118: `switchMode.boat' is a `field' but a `type' was expected There are inconsistent line endings in the 'Assets/scripts/boat.cs' script. Some are Mac OS X (UNIX) and some are Windows. This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
and in Visual Studio it highlights everythhing named boat and says CS0246 The type or namespace name 'boat' could not be found (are you missing a using directive or an assembly reference?) :\Users\justnoone\OneDrive\Documents aze\Assets\scripts\switchMode.cs 25 Active
Hello, great tutorial, but I have one problem.The problem is when I press play, and I drive my boat for a while then when I turn right or left, my boat starts to fly, or turn arround. Please help
+Nick Todrick weird, does the rigidbody have the same constraints as mine? you could click 'Show More' under the video and download the complete project, then you can compare and see what's different
Hello Aaron, I’m creating a project about simulating riding a bike in a 3D world using unity, can you please if you can make a character riding a bicycle and move around like he is paddling. Thanks Ali
+Ali Mohammed I have no idea, that sounds like something that hasn't been invented yet. If you figure it out, it should be VR too, I know you can attach an Oculus Rift to Unity, that would be pretty amazing
+Aaron Hibberd, a question and a request. As I explained before I'm working on simulator riding a bicycle in a 3D world, using UNITY and a real bicycle as a controller. Also I'm using Ant+ USB stick, speed sensor in order to get a live feed and using Ant+ library inside the assets folder to connect the bicycle to unity. What I'm stuck in that I have some errors still did not managed to solve, also no idea how to get live feed inside unity to make the "player" to move forward. Can you please do a tutorial on this at lest a sphere that can move when the real bicycle started to move? And can I play around with the FPC to make the player turn head without turning direction?
+Ali Mohammed hmmm I have no idea how to use Ant, I have no experience with it, does it send any information into Unity that you can read with a trace statement? Like an Input? If you can read a number or some variable that represents the bike moving, then you could convert that into velocity on a rigidbody
+NEON STUDIOS is the art just rotated sideways? if you use the transform, and it's on Local mode(at the top) not Global, and you select the boat, is the boat facing the same way as the blue arrow? It might be working but you just need to rotate the child gameObject with the boat mesh so it's facing forward
Thank you very much for creating this. This helped a lot. I would like to make the water area larger but when I expand the ground to 1000 x 1000 and the water to 200 the game will play but the wave and reflection is way off and too fast. I've tried different settings with not luck. How can one make the water area very large to play in? What other setting is needed to go along with increasing the ground and water scales? Thanks.
+Christoph Siekmann I think you could have an effect on the camera that makes it look like you're underwater, and turn it on whenever it goes below the surface
Hey Aaron, I got into a problem. I placed the Multipurpose camera right at the back of the boat and when I click on play, the camera slowly goes down and rotates itself and zooms 180 degrees and last, I can only see the boat from the front view only!
+slim beast hmmm, I'm just guessing, but is the art for the boat facing backwards compared to it's parent gameObject? How is the camera attached? I think that one is supposed to be outside the gameObject, just in the world, and then you attach something for it to look at? It might automatically look at whatever is tagged as the 'Player' too, which might be your FPS controller instead of the boat?
I didn't put an fps controller yet but that shouldn't cause the multipurpose camera to rotate right? Also, I used my own 3ds max model for the boat and some houses of my own. I did the same project before and it worked with no camera problem but I opened a new project again just to rewind the process and somehow the camera goes weird. I do not know how to check is my boat facing backwards!? The pivot point set in 3ds max is in the very middle!!
+slim beast In Unity, when you are using the transform tool (where you select a gameobject and it has the arrows for moving it) At the top there's that button to switch between local and global, while you are in local, the blue arrow should be pointing forwards, the direction your boat is looking, that's how you can tell what side the front of your boat is. You only care about the parent gameObject, not the models(children) inside it, because you are moving the parent forward, and I''m guessing the camera is probably using that to know what side is behind it so it can follow from behind
Hi Aaron, I am making a game with following your tutorial for the boat and First Person controllers, but I added waves to the water and a buoyancy script that makes the boat go up and down with the waves and the boat still drives pretty well, but when I change to First Person, it stops working, could you please let me know what would you do in this case, what changes would I need to make to the FPS Controller? Thanks man
+GRMLauncher does the Rigidbody have the correct constraints checked? If that's not it, under the video you can download the complete project to compare and see if you notice anything that's different
hello, in the game world of warship, the speed is set by a lever, and it stays constant, it can increase or decrease, how to do that? after this script the boat is running and going fast, how to limit it, to look like the game world the warships?
Make a public float "Speed".... And the ship will move based on "Speed" { Simplized Example: Ship.move (transform.forward * speed) } And lets say you want the speed to increase? Well lets say if ("Whatever you put here to INCREASE ship speed") { Speed += 1 * time.deltatime; //Also notice that if you use delta time this should only be used for anything But the equivalent of just a click, But more a press and hold } and vise versa if ("Whatever you put here to DECREASE ship speed") { Speed -= 1 * time.deltatime; } And the ship will move based on the Updated speed To lock the ship speed to a minimum and a maximum do this: Speed = mathf.clamp(Speed, 0, "Whatever max speed you want here"); What mathf.clamp does in this following case for instance float XYZ = Mathf.clamp(XYZ, 0, 17); it prevents the float or int from going under the number of 0, and from going above the number of 17 Now I dont know really anything about world of warships.. saw a 10 sec clip... But I think im giving correct information based on my understanding of what you said.. this answer was an attempt atleast, Do an awesome job out there
Great tutorial! Thanks. I'm a total begginer and C# is still giberish to me but I'm slowly starting to understand some basics watching your videos. I'm now trying to make simple story based fps adventure and I need a boat to move from island to island. Your tutorial is perfect but can you please explain how to do it so the switch between ship and fps would only be possible when player is close to the boat? It would be great if it also shows sign like "press E to enter" when player enters that invisible collider zone around the ship. Thanks!
Have a bool that allows pressing E to work. Set up a trigger, on the trigger enter set it to true, on the trigger exit set it to false docs.unity3d.com/ScriptReference/Collider.OnTriggerEnter.html docs.unity3d.com/ScriptReference/Collider.OnTriggerExit.html something like that
Thanks for an answer. I already know OnTriggerEnter scripts. I learned those last week and I use them to move from scene to scene or even spawn objects. But I dont know how exactly should the line look for switching the whole boat script true/false by entering or exiting trigger. Can you correct my last line? Sorry for being a total noob :) public class ExampleClass : MonoBehaviour { void OnTriggerEnter(Collider other) { "Boatscript" is true; } }
Hello. I found this very helpful but when I try to run it a compile error comes up saying " Assets/Scripts/switchMode.cs(23,43): error CS0118: `switchMode.boat' is a `field' but a `type' was expected ". Do you know how to fix this? If so can you help me please? Thanks in advance.
+jake wd it sounds like just a simple mistake in the code somewhere, you can download my completed project from the link under the video, and compare the scripts to see if anything looks different. If you can't find it you can send me a link to your project with dropbox and I'll see if I can find it
+Aaron Hibberd Thanks for the reply. The project I downloaded was fine along with when I copied the assets but when I copied the code in my own project it wouldn't. I'll watch the tutorial again and hopefully I will pick out the problem and it will work :D.
+Aaron Hibberd Sorry for late reply. The scripts are C# but recently I have been trying to find Unity 5 FPS tutorials as they cover shooting and animation. However I find that the old FPS tutorials for Unity 4 don't work properly with Unity 5.
for some reason when I press 2 to move the player to the player start position it instead goes to the last place I was standing out of the water, do you know why this might be happening? if I hold it down the player is in the right place, but as soon as I let go it returns to land.
I doubt that you still care about this but for anyone reading: //You need to place the line player.transform.position = playerStartPosition.transform.position //before the player.SetActive(true); //line The character controller has it's own internal definition of what position it has, and will set the transform's position to that every frame while it's enabled.
Hi, I'm a student of the unity3d engine, I would like to learn about movements with boats, helicopters, tanks, planes, submarines, could you teach us? I use the 2019 version as importing these packs that you used, I do not see this option here in the unity hub, thank you
When i did the script (exactly the same but with different var names), i tested it and when i pressed the up key, the boat started flying upwards, how do i fix it? Pd: sorry for bad english.
+Esd Sam +Samuel Shajy if you download the completed project under the video is it set up the same? The model of the boat might need to be rotated so that its forward direction is the same as its parent game object's forward direction. Near the top of Unity, where it has Pivot, and then either Global or Local, make sure that's set to Local, and then select GameObjects and see what way the blue arrow is facing
Aaron Hibberd thanks for saying but i tried my luck as this code atlast - rbody.AddForce(transform . right * h *accellerateSpeed * Time.deltaTime); and it worked
when i start scripting in unity 5.5 it's show different in the start of the script using System.Collections; using System.Collections.Generic; using UnityEngine; it's the same ?
Hey Aaron, thanks for tutorial it really helped me. But the problem is game starts with using boat mode and it can be switch anywhere in the map. So how can i enable switch boat mode when player close to it and let the game begin where player is? Thanks
+Einars Miglans There's different input code for mobile controls, I could probably do a tutorial on that at some point docs.unity3d.com/Manual/MobileInput.html
+Derek Atterling It sounds like there's either a mistake in the code, if you double click the error it should bring you to the line where it thinks the mistake is, like you didn't write it the same as me. Or in Edit > Project Settings > Input, something like Horizontal or Vertcal is changed from how it should be by default. If you can't find it, use dropbox db.tt/sAI4q4OQ put your whole project in the "Public" folder, and click on share, and send me that link and I'll have a look at it
using UnityEngine; using System.Collections; public class switchMode : MonoBehaviour { public GameObject boat; public GameObject boatCamera; public GameObject player; public GameObject playerStartPos; // Use this for initialization void Start () { } // Update is called once per frame void Update () { //set to boat mode// if(Input.GetKey("e")) { boat.GetComponent().isKinematic = false; boat.GetComponent().enabled = true; boatCamera.SetActive(true); player.SetActive(false); } //set to FPS mode// if(Input.GetKey("r")) { boat.GetComponent().isKinematic = true; boat.GetComponent().enabled = false; boatCamera.SetActive(false); player.SetActive(true); player.transform.position = playerStartPos.transform.position; } } }
ur tutorials is really very awsum nd i want to learn one thing plz make a tutorial on it how we have to make effect like when our ship collide to hill it will be destroy with fire and give us sound boom as we see in the movies plzz its really very simple to u thannku
QSA rex There's too many requests to do them all. I'm basically putting everyone's suggestion in a hat, and pulling one out when I have time, so it might take forever, but an FPS is definitely something that I want to do because it's really cool
Window > Asset Store, search for Fishing Boat, click download. Or if you mean the completed project, I have a download link in the description, click 'Show More'
Hey I know it is 5 years old but people still watch this so if you think this may be useful pin this, it is a way to get the mesh collider on the non kinematic object:
First you make the collider where you want it, then you copy it and paste it onto an empty game Object that has no parents. On the same object you make the following script:
public GameObject mesh;
public GameObject followedObject;
void Update()
{
mesh.transform.position = followedObject.transform.position;
}
Where mesh is the gameObject you just made (this can of course be left but maybe you want to move another mesh, or you have this script on another object) and FollowedObject is the object that actually is the visible thing in the scene. In my project I use this to have my player walk on the ship, but if you enable gravity and disable freezing it would obviously fall, yes. But then you can just add a child to the ships bottom that then is the collider for the gound
That was great. Your casual description of accessing components from scripts was a big "Aha!" moment. I've been following unity tutorials and copying syntax without realizing what exactly I was doing... until now. Thanks!
Most helpful unity tutorial ever, been trying to get this to work for days before i found this, thank you!!!
1. All physics update must go in FixedUpdate()
2. Input.GetKeyUp(KeyCode) would be a better choice for switch functionality
3. Buoyancy would add a nice touch too.
Still a nice tut. Have been geeking out on your vids all day, Hibby. Way to go, man.
very nice, your are my first teacher in unity, i am not good at English, but your tutorial is outstanding , I can actually know what you are talking about , it's very clear and Understandable, thank you very much.
Terrific tutorial. Learned much watching this one. Love the water color choice.
+Tanagaba thanks!
my boat does not work with a big collider
This is awesome , you are the first to upload a boat video men this is incredible ! Thumb up!.
even if I click on the playerStartPos and press Shift+F, It still stays stationary in-game! Did I do something wrong?
+Jayden Grammes I'm not sure what went wrong, but you could download the complete project under the video and see if something looks different?
me too
nice work, one of the easiest to follow tutorials I have ever watched
anyone that doesn't get a reply from me: make sure your google plus settings are set to allow replies on your comments, some people don't have a reply button under their comments
+Aaron Hibberd thanks for the game . Really great! Would you have any google cardboard up?
+F Campbell thanks! I don't own google cardboard, I should probably look into that, I don't own a smartphone, I do have an ipod touch that might work with it
oh - you don't need a smartphone and you don't need google cardboard. It is an sdk for free online and you can see /test it on your laptop. Just like any build.
+F Campbell interesting, but then how do you know if it works well? like it doesn't make people puke or something haha
+Aaron Gibbered You are too funny. ,...do you have an email address or is there a way to ask or reimburse you for your time on something that is within the calibre of the boat and i'd like to figure out or solve somehow? (fingers crossed!) fhcampbell.nyc at g mail period com
You are awesome, thank you for this great tutorial.. I had been attempting this on my own and not doing very well, this past week.
Great tutorials bro! Learning alot from you and I appreciate all your work here!!! New sub here and looking forward to watching a few more of your tutorials!!!
Thanks. Great tutorial for anyone coming from UE4/UDK. Learned a lot.
+Natasha Kutas (Toxia) thanks! I want to learn Unreal someday too, those graphics
Very nice boat tutorial! water looks great
Hi i am trying to do this myself, using this tutorial. I have a problem at around 13:30 in the tutorial. When i run my program, the player falls through the bottom of the boat and ends up in the ocean behind the boat. Any ideas?
+Henrik Krüger hmmm, both the boat and player have colliders? The colliders are not set to 'is Trigger', and they look correct from every angle? you could click 'Show More' and download the project to compare and see what's different
+Aaron Hibberd Thank you! :D
+Henrik Krüger you're welcome :)
Strange, Aaron the Unity lets choose the color, it appears in the color box I choose it is accepted in the shader but it is not going to pro project.so this went wrong the rest you taught it was cool. Only the water does not stay cool.
Can you add a wake to the boat while moving? It would look more realistic driving it. Any suggestions how to do it? Thanks
I have a problem about switchmode. FPSController comes to the deck when I hold down the button but it returns to its local position when I release the button.
lol Man in the boat. That boat asset makes me think of something but I can't quite put my finger on it. :)
Do you have any videos related to move a boat within the water surface without any arrow keys or virtual button??
For some reason my multipurpose camera rig keeps on turning 90 degrees away from the boat
ist it possible to create a ship which is parking? like the hafenmanöver? It Would be so great!!
can you explain why scaling x to 20 and y to 10 for water simple actually fits exactly on a ground with x scaling to 100 and y scaling to 100?
This was immensely helpful - thank you!
How can I improve the code so that the boat jumps ramps? I placed a ramp and added it a "slippery" physic material, but the boat collider got stucked when I drove it to the ramp
my friend how did you be able to preview both render game compile and viewport work space in single time ? are there any functionality there in unity somewhere or you just do something can be said combined screnshots somehow , as far as i know unity does not have any onscreen compile game as well workable viewport in one time as well, btw nice teaching
+khurram sa at the top click on 'Window' and find the window you want like Game view, and then you can just drag them where you want for the layout
thank you for helping giving the best tutorials for ever.....
Thanks you dude, just the explanation were very useful
Hi, I am just getting started. I am looking for a way to switch player modes from my character hero guy walking around (third person view) and switch to (first person view) walking/running/standing but then also getting in/out of his jeep (with 1st person looking through windscreen and third person camera just following the car as he drives around. A tut on that would be greatly appreciated. C# scripts please. Part of the problem I am trying to learn is how to do this right with mechanim animations.
Snake Plisken I will see what I can do (eventually) :)
I am working on a VR project and instead of the FPS Player controller I am using the OVR Player Controller. I need the water deeper, like the ocean, so I added a float script to make the boat float. But when i place my ovr player controller on the boat, it collides with the boat and falls down and the boat keeps rotating. How do I make it work in a deep water??
Excellent tutorial! Very easy to follow.
+charles blackwell thanks!
Great work Aaron. How would you have the boat jump a ramp?
+Taylor Moore Thanks. It might work right away if you just create > new 3d object > Cube, and then make the cube big and rotate it on an angle to drive up. I would probably give the collider on the cube a physics material, and set its friction and bounce settings to 0 and minimum combine, so the boat can go smoothly up it
Ok, now i knows ,thanks Aaron Hibberd .
how can I set the same button for enter boat and enter FPS? I just want to use Button B
hai... i want quiz script for dragging the answer button to correct position of the model parts... please help me from this problem...if it wrong it get red color and goes to correct position and turns to green......
Hi Aaron! What mac is that? Is that mac good for heavy game designing? Love your videos! :D
haha, no it's not good, its a 2008 iMac and it's slowly dying, I'm using a Windows PC now :P
good work window it's best os ever and your videos are very good thx
How would u do a submarine? Just curious because not many games go underwater as such
+xCONDOGZz that's a cool idea, I think you would just turn gravity off on the rigidbody, addforce forward, and rotate/tilt to steer
what about walking around inside the ship without the water coming through? does physics do that for you or what?
+xCONDOGZz I don't think Unity has a good water physics, you would have to fake it, like there isn't actually any water, you would just be floating in empty space and the background is all blue, or the camera has an effect on it so it looks like you're in the ocean. You could use the particle system to make bubbles. There might be some physics effects you could make to be like water currents too
uh ok. may be a bit difficult for me but I'll definitely like to take a look at doing it soon. Thanks alot man and keep up the awesome videos
+xCONDOGZz thanks, if you do make it, I'd like to see a video or screens of it
Aaron My Boat is not moving also i watched your other tutorial of chaarcter animation in which also the chracters has all physics but unable to move with map in game play plz help !
hey man nice boat i have a problem, in the console it says [argumentexeption; input axis virtical is not setup]. what do i do??
Tried this on my other boat asset and the boat doesn't move but my player/camera does... weird
anyone know how to resolve this?
Very neat would make a great vehicle system
+Ventivian thanks
Aaaand subscribed..Great video!! I am waiting for my new gaming laptop then I will be tinkering with this but I want to use a bit better graphics, I have a lot to learn but I have some basic programming knowledge that has just started coming back to me haha. I used to be pretty decent in Photoshop, and my wife is a wizard in coral draw :P. Anyway I'd really enjoy learning to make my wife's kids and our son their own video games. User friendly, and only the content I feel they should have access to. What a fun way to do what you love and make the things our children see a little more kid friendly. I want to make free games and use the ad campaign to make side cash. Not looking for profit though, one day if i get good enough, I might get noticed by some renown company for a job opportunity. I like that you are going at a human pace and not a quantum speed, and you seem like a pretty chill dude. Thanks for these videos, I look forward to watching more and hopefully my excitement doesn't betray me!
+Matthew Cornacchia Awesome, you should make an iOS/Android app :)
Aaron Hibberd Thats what i was leaning to start out with, then I can have the kids be my little testers. Kids have a habit of being brutally honest lol.
+Matthew Cornacchia haha, yea they do "grandma, why are you wrinkly?"
Hi Aaron Hibberd
I want to make 4 buttons for this game, one for left and one for right and one for accellerate speed and the last one for stop the boat.
thanks for the awesome tutorial! helped me a lot:)
Love the tutorial, Got question thou I made it to where i start out NOT in boat
So when u hope in the boat an drive around then get out it spawns me Back the the spot i got in the boat an the boat is left WAY over where it was lol Any idea how to fix this?
Can you make an Update-Video? Also I have the problem, when I don´t tick the "Use Gravity", my boat doesn't move, but when I tick it, my boat moves very faulty in the curves.
why cant you use a mesh collider? i use mesh colliders for every model i make. im just curious if im missing some sort of problem in my projects.
+Taylor Griffin you can use mesh colliders, but they have to be convex if they are going to collide, and they weren't convex on that boat model without filling in holes and making a big weird shape that I didn't want. something to do with how it was modelled docs.unity3d.com/Manual/class-MeshCollider.html
I understand, but why can't you have colliding meshes that aren't convex? I have no problem when i do that.
+Taylor Griffin I'm not sure, but for me he was falling through the boat when I used it's mesh collider, and on the Unity documentation it says "Mesh Colliders that are marked as Convex can collide with other Mesh Colliders". So I guess that's a question for the Unity developers
+Aaron Hibberd hmm I guess it just depends. Anyway cheers on A+ tut man :)
+Taylor Griffin thanks :)
Hi. Great videos. Thanks a lot. I learn quite a lot from them!!! Really great.
hi, i tried doing the switchmode.cs script BUT unity only says :
Assets/scripts/switchMode.cs(35,31): error CS0118: `switchMode.boat' is a `field' but a `type' was expected
There are inconsistent line endings in the 'Assets/scripts/boat.cs' script. Some are Mac OS X (UNIX) and some are Windows.
This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
btw i am a complete new to c# so i rly dont know anything bout this.
and in Visual Studio it highlights everythhing named boat and says CS0246 The type or namespace name 'boat' could not be found (are you missing a using directive or an assembly reference?) :\Users\justnoone\OneDrive\Documents
aze\Assets\scripts\switchMode.cs 25 Active
Hello, great tutorial, but I have one problem.The problem is when I press play, and I drive my boat for a while then when I turn right or left, my boat starts to fly, or turn arround. Please help
+Nick Todrick weird, does the rigidbody have the same constraints as mine? you could click 'Show More' under the video and download the complete project, then you can compare and see what's different
+Aaron Hibberd You are right, my constraints was set all wrong. No it works just fine. Thank you very much.
+Nick Todrick awesome
Pleased to show how adding the hand
Adam Arzo good idea
Is there anyway to make it so you start as the player and then switch to the boat instead of the other way around?
Yes i just did that if u need help let me know
Hello Aaron,
I’m creating a project about simulating riding a bike in a 3D world using unity, can you please if you can make a character riding a bicycle and move around like he is paddling.
Thanks
Ali
+Ali Mohammed I'll add it to my giant list, that would be cool, a motorcycle would be cool too
hi aron,
how hard is it to connect a real bicycle to unity and use it as a controller?, and how?
+Ali Mohammed I have no idea, that sounds like something that hasn't been invented yet. If you figure it out, it should be VR too, I know you can attach an Oculus Rift to Unity, that would be pretty amazing
+Aaron Hibberd, a question and a request.
As I explained before I'm working on simulator riding a bicycle in a 3D world, using UNITY and a real bicycle as a controller. Also I'm using Ant+ USB stick, speed sensor in order to get a live feed and using Ant+ library inside the assets folder to connect the bicycle to unity.
What I'm stuck in that I have some errors still did not managed to solve, also no idea how to get live feed inside unity to make the "player" to move forward.
Can you please do a tutorial on this at lest a sphere that can move when the real bicycle started to move?
And can I play around with the FPC to make the player turn head without turning direction?
+Ali Mohammed hmmm I have no idea how to use Ant, I have no experience with it, does it send any information into Unity that you can read with a trace statement? Like an Input? If you can read a number or some variable that represents the bike moving, then you could convert that into velocity on a rigidbody
it was nice do you know that for car moving controllers
can you please help me?
my boat is driving sideways and my commands are correct like yours what should I do?
+NEON STUDIOS is the art just rotated sideways? if you use the transform, and it's on Local mode(at the top) not Global, and you select the boat, is the boat facing the same way as the blue arrow? It might be working but you just need to rotate the child gameObject with the boat mesh so it's facing forward
Thanks alot!
Thank you very much for creating this. This helped a lot. I would like to make the water area larger but when I expand the ground to 1000 x 1000 and the water to 200 the game will play but the wave and reflection is way off and too fast. I've tried different settings with not luck. How can one make the water area very large to play in? What other setting is needed to go along with increasing the ground and water scales? Thanks.
Maybe you could use multiples waters?
is there a way to make the water 3d that i can walk underwater?
+Christoph Siekmann I think you could have an effect on the camera that makes it look like you're underwater, and turn it on whenever it goes below the surface
Ty got it
Did u figure this out id sure like to learn how to go underway an see the water
Hey Aaron, I got into a problem. I placed the Multipurpose camera right at the back of the boat and when I click on play, the camera slowly goes down and rotates itself and zooms 180 degrees and last, I can only see the boat from the front view only!
+slim beast hmmm, I'm just guessing, but is the art for the boat facing backwards compared to it's parent gameObject? How is the camera attached? I think that one is supposed to be outside the gameObject, just in the world, and then you attach something for it to look at? It might automatically look at whatever is tagged as the 'Player' too, which might be your FPS controller instead of the boat?
I didn't put an fps controller yet but that shouldn't cause the multipurpose camera to rotate right?
Also, I used my own 3ds max model for the boat and some houses of my own. I did the same project before and it worked with no camera problem but I opened a new project again just to rewind the process and somehow the camera goes weird. I do not know how to check is my boat facing backwards!? The pivot point set in 3ds max is in the very middle!!
+slim beast In Unity, when you are using the transform tool (where you select a gameobject and it has the arrows for moving it) At the top there's that button to switch between local and global, while you are in local, the blue arrow should be pointing forwards, the direction your boat is looking, that's how you can tell what side the front of your boat is. You only care about the parent gameObject, not the models(children) inside it, because you are moving the parent forward, and I''m guessing the camera is probably using that to know what side is behind it so it can follow from behind
hey bro , its goin vertical instead of forward ??????
my boat has got a problem in turning...... it turns for only a bit and then stops....help?
Love your tutorials! Great if you could do a car controller one, with realistic driving
Hi Aaron, I am making a game with following your tutorial for the boat and First Person controllers, but I added waves to the water and a buoyancy script that makes the boat go up and down with the waves and the boat still drives pretty well, but when I change to First Person, it stops working, could you please let me know what would you do in this case, what changes would I need to make to the FPS Controller? Thanks man
Hi there! Could you please help me? For some reason i cannot move the boat and i can't find any problems with my script!
+GRMLauncher does the Rigidbody have the correct constraints checked? If that's not it, under the video you can download the complete project to compare and see if you notice anything that's different
I'll download it and i'll let you know!Thanks!
hi aaron why i cant move my boat with touch just on keyboard
hello, in the game world of warship, the speed is set by a lever, and it stays constant, it can increase or decrease, how to do that? after this script the boat is running and going fast, how to limit it, to look like the game world the warships?
Make a public float "Speed".... And the ship will move based on "Speed"
{
Simplized Example:
Ship.move (transform.forward * speed)
}
And lets say you want the speed to increase?
Well lets say
if ("Whatever you put here to INCREASE ship speed")
{
Speed += 1 * time.deltatime; //Also notice that if you use delta time this should only be used for anything But the equivalent of just a click, But more a press and hold
}
and vise versa
if ("Whatever you put here to DECREASE ship speed")
{
Speed -= 1 * time.deltatime;
}
And the ship will move based on the Updated speed
To lock the ship speed to a minimum and a maximum
do this:
Speed = mathf.clamp(Speed, 0, "Whatever max speed you want here");
What mathf.clamp does in this following case for instance
float XYZ = Mathf.clamp(XYZ, 0, 17);
it prevents the float or int from going under the number of 0, and from going above the number of 17
Now I dont know really anything about world of warships.. saw a 10 sec clip... But I think im giving correct information based on my understanding of what you said..
this answer was an attempt atleast, Do an awesome job out there
Thankyou very much for your effort it was really helpful for me, thanks a ton!!
akash joshi :D
Aaron Hibberd thanx a lot bro.
arjun varma Alluri
you're welcome :)
hy hajur kun thau bata ho ne!!
can you please do how to scipt a simple fps c# coz its kinda crapy using unities I like to script myself but I haven't got the fps script just rite
+Gian-Luca Nardini Added to my list of potential tutorials
yes, but when i put them it stops moving
Great tutorial! Thanks. I'm a total begginer and C# is still giberish to me but I'm slowly starting to understand some basics watching your videos. I'm now trying to make simple story based fps adventure and I need a boat to move from island to island. Your tutorial is perfect but can you please explain how to do it so the switch between ship and fps would only be possible when player is close to the boat? It would be great if it also shows sign like "press E to enter" when player enters that invisible collider zone around the ship. Thanks!
Have a bool that allows pressing E to work. Set up a trigger, on the trigger enter set it to true, on the trigger exit set it to false docs.unity3d.com/ScriptReference/Collider.OnTriggerEnter.html docs.unity3d.com/ScriptReference/Collider.OnTriggerExit.html something like that
Thanks for an answer. I already know OnTriggerEnter scripts. I learned those last week and I use them to move from scene to scene or even spawn objects. But I dont know how exactly should the line look for switching the whole boat script true/false by entering or exiting trigger. Can you correct my last line? Sorry for being a total noob :)
public class ExampleClass : MonoBehaviour {
void OnTriggerEnter(Collider other) {
"Boatscript" is true;
}
}
My fps controller is not moving in play mode.
Have a tutorial of move a train in rails...And modify your velocity like have 3 or 4 speeds pressing butons for change? Thx and waiting^^
Julio Mazzuca Sorry my bad english
Julio Mazzuca oh man, I'm not sure how I would lock the train to the rails, I'll look into it though
Aaron Hibberd no problem...Thx anyway.....i Subscribe and wait for more vídeos....See ya
Julio Mazzuca
see ya :)
+Aaron Hibberd Even I am looking for the solution regarding the train lock to the rails.
Hello. I found this very helpful but when I try to run it a compile error comes up saying " Assets/Scripts/switchMode.cs(23,43): error CS0118: `switchMode.boat' is a `field' but a `type' was expected ". Do you know how to fix this? If so can you help me please? Thanks in advance.
+jake wd it sounds like just a simple mistake in the code somewhere, you can download my completed project from the link under the video, and compare the scripts to see if anything looks different. If you can't find it you can send me a link to your project with dropbox and I'll see if I can find it
+Aaron Hibberd Thanks for the reply. The project I downloaded was fine along with when I copied the assets but when I copied the code in my own project it wouldn't. I'll watch the tutorial again and hopefully I will pick out the problem and it will work :D.
jake wd
is your script a C# kind of script?
+Aaron Hibberd Sorry for late reply. The scripts are C# but recently I have been trying to find Unity 5 FPS tutorials as they cover shooting and animation. However I find that the old FPS tutorials for Unity 4 don't work properly with Unity 5.
+jake wd someday when I learn how to make an FPS, I'll do a tutorial on it, but you'll probably already have made one by then :P
the water works weird for me. it's a pink plate with no water animation
for some reason when I press 2 to move the player to the player start position it instead goes to the last place I was standing out of the water, do you know why this might be happening? if I hold it down the player is in the right place, but as soon as I let go it returns to land.
I doubt that you still care about this but for anyone reading:
//You need to place the line
player.transform.position = playerStartPosition.transform.position
//before the
player.SetActive(true); //line
The character controller has it's own internal definition of what position it has, and will set the transform's position to that every frame while it's enabled.
@@BigMummyLongLegs you helped me out thanks!
Hi, I'm a student of the unity3d engine, I would like to learn about movements with boats, helicopters, tanks, planes, submarines, could you teach us? I use the 2019 version as importing these packs that you used, I do not see this option here in the unity hub, thank you
why is the video blurred?
When i did the script (exactly the same but with different var names), i tested it and when i pressed the up key, the boat started flying upwards, how do i fix it? Pd: sorry for bad english.
+sacsac9 does the boat rigidbody have the same constraints checked on?
Hey uh, my ship controls are inverted as in W goes backwards .... what did I do? xD
turn around the model for the ship
Hey bro i got a problem !!!! when i add your script then instead of movin forward it move sideways ??????
+Esd Sam +Samuel Shajy if you download the completed project under the video is it set up the same? The model of the boat might need to be rotated so that its forward direction is the same as its parent game object's forward direction. Near the top of Unity, where it has Pivot, and then either Global or Local, make sure that's set to Local, and then select GameObjects and see what way the blue arrow is facing
Aaron Hibberd thanks for saying but i tried my luck as this code atlast - rbody.AddForce(transform . right * h *accellerateSpeed * Time.deltaTime);
and it worked
+Esd Sam that's good, that works too, although technically it sounds like you are moving it left/right and the art is somehow rotated 90 degrees
Aaron Hibberd hahaha !!!! thanks for your cool videos be sure to make more of them !!!! and i will try to give you my game when ready !!! .
+Esd Sam Awesome!
when i start scripting in unity 5.5 it's show different in the start of the script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
it's the same ?
hy i need your favour i dont know how but my player automatical move
plz plz tell me
Hey Aaron, thanks for tutorial it really helped me. But the problem is game starts with using boat mode and it can be switch anywhere in the map. So how can i enable switch boat mode when player close to it and let the game begin where player is? Thanks
Thank you so much! You helped me solve a huge problem!
can you make it with galleon ship ?
I give you a sub m8... Soo, please answer, what i suppose to do, if i want to make a game for android, how i can set up controls for phone???
+Einars Miglans There's different input code for mobile controls, I could probably do a tutorial on that at some point docs.unity3d.com/Manual/MobileInput.html
Aaron Hibberd Thank you, thank you, thank you...
+Einars Miglans haha, you're welcome
OMG you are so good at this !!!! how did you study all this ???
+Esd Sam haha thanks! I used to work in a game studio
I am getting 2 errors after i have just did the scripting for the acceleration and turning of the boat.
+Derek Atterling what do the errors say?
+Aaron Hibberd Unity.Engine.Input does not contain definition for GetAxis
and The name r does not exist in the current context
+Derek Atterling It sounds like there's either a mistake in the code, if you double click the error it should bring you to the line where it thinks the mistake is, like you didn't write it the same as me. Or in Edit > Project Settings > Input, something like Horizontal or Vertcal is changed from how it should be by default. If you can't find it, use dropbox db.tt/sAI4q4OQ put your whole project in the "Public" folder, and click on share, and send me that link and I'll have a look at it
Fixed it thans
Derek Atterling
ok cool
can i add the scripts to 3rd person too?
hey can u make this boat to move by the blow of wind and move according to waves of water as pirates ships :)
Why it has to be convex in unity 5?
can you add a copy of your switchMode script here?
using UnityEngine;
using System.Collections;
public class switchMode : MonoBehaviour {
public GameObject boat;
public GameObject boatCamera;
public GameObject player;
public GameObject playerStartPos;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update ()
{
//set to boat mode//
if(Input.GetKey("e"))
{
boat.GetComponent().isKinematic = false;
boat.GetComponent().enabled = true;
boatCamera.SetActive(true);
player.SetActive(false);
}
//set to FPS mode//
if(Input.GetKey("r"))
{
boat.GetComponent().isKinematic = true;
boat.GetComponent().enabled = false;
boatCamera.SetActive(false);
player.SetActive(true);
player.transform.position = playerStartPos.transform.position;
}
}
}
Great Video. Thanks! Learned a lot.
+ninjapiratespy Thanks, Awesome!
great tutorial :) gonna start on my game today !
+【=ω=】@ 歌ってみた Awesome!
ur tutorials is really very awsum nd i want to learn one thing plz make a tutorial on it how we have to make effect like when our ship collide to hill it will be destroy with fire and give us sound boom as we see in the movies plzz its really very simple to u thannku
Great tutorial! Thank you! :)
Can you make a tutorial on how to make a realistic fps pls pls
+QSA rex that would be cool :)
+Aaron Hibberd yay when can I expect it?
QSA rex There's too many requests to do them all. I'm basically putting everyone's suggestion in a hat, and pulling one out when I have time, so it might take forever, but an FPS is definitely something that I want to do because it's really cool
+Aaron Hibberd ok thank you very much:) I've already practiced making terrains fir the fps:)
Nice!
how to download assets ?
Window > Asset Store, search for Fishing Boat, click download. Or if you mean the completed project, I have a download link in the description, click 'Show More'
ive done everything right but boat is not moving
Maybe you forgot to add the script to the boat components.
thank you!! 덕분에 어떠한 원리로 전환되는지 이해햇네요
hello.where to find the boat my unity and free
you can find any free models here : www.blendswap.com/blends