x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How would I make a boat enterable and driveable?

I'm making a little VR game for the Oculus. The main point of this game is about being in a boat. I have the boat in my scene as a skeletal mesh in a "Wheeled vehicle" blueprint. I know it doesn't have wheels but this is the closest I can find to match, maybe you could tell me a blueprint more suited to it. I have one bone weighted to the boat for movement and the other weighted to the outboard motor on the back so It can be moved for steering. I have no collision on the boat as of yet.

I've made a few projects in UE4 but none involving vehicles and all the tutorials I can find involve cars that you use as your default pawn. I need it so my character can enter and exit the boat. (My character is just a camera on top of a capsule collision with arms.)

Any help would be really appreciated I have no idea where I would start with this!

Product Version: UE 4.7
Tags:
more ▼

asked Dec 12 '15 at 07:00 PM in Blueprint Scripting

avatar image

AdamDoubleU
5 2 5 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first
more ▼

answered Dec 12 '15 at 07:09 PM

avatar image

Jacky
16.9k 671 167 678

avatar image AdamDoubleU Dec 12 '15 at 07:37 PM

There is only one vehicle in my level which is the boat. I've had a look in that sample map and I'm a little clearer on some things and worse on others, there's lots of sever/ multiplayer related stuff in that and I think that's what's confusing me, I'm also not sure if I've even set my boat up right for any of the stuff in this other map to work If i tried it in mine.

I also don't want to destroy my actor I want the actor to be sat on the seat with the right arm leaning backl grabbing the throttle.

avatar image Jacky Dec 12 '15 at 08:16 PM

Dont let networking stuff confuse you. They dont affect single player really. If you dont want those at all here is what you need:

In player character BP alt text

In vehicle BP alt text

You just need to add a Box collision component(collision set to OverlapAllDynamic) to your boat to get the overlap events.

vehicleleave.jpg (183.6 kB)
vehicleenter.jpg (64.5 kB)
avatar image AdamDoubleU Dec 12 '15 at 08:45 PM

Can I just ask what's coming out of "Mesh" into "get right vector" under "set spawn location for player"? I thought It was some kind of break but I've never seen one that looked like that.

avatar image Jacky Dec 12 '15 at 08:59 PM

Mesh > Get Relative Rotation. Then right click on purple rotation pin and Split Struct Pin. It's the same as Break but tidier.

avatar image AdamDoubleU Dec 12 '15 at 09:28 PM

Ok I've got everything set up how it is in those pictures I'm pretty sure. (I'll upload my blueprints) ~Nothing happens when I'm inside the box and press F which Is what i set it up to. I'm assuming the problem Is with my vehicle? Cause I've hot it set up as a wheeled vehicle but have no wheels maybe?

I think I've set the right things in my blueprint for the boat, any ideas? When I spawn as the boat as the default pawn it the input axis nodes don't fire and I can't move at all. I've obviously done something wrong, but I'm not sure where cause every tutorial is for vehicles that have wheels and mind don't so I skipped the wheel related parts.

I set my 4 wheels up as "none" rather than "Vehicle wheel" and that's pretty much all I changed in regards to wheels.

Character Blueprint alt text

Boat Blueprint alt text

My overlap box is definitely where the player can stand alt text

Some stuff In the boat blueprint I was messing with hoping it would work alt text

Thanks for your help so far, I'm just really stuck at the moment sorry to be a hassle.

1.png (367.2 kB)
2.png (335.4 kB)
3.png (2.2 MB)
4.png (32.7 kB)
avatar image Jacky Dec 13 '15 at 01:00 AM

You forgot to plug CanBeEntered to the Branch in player ner/not ner section. Also i assume CanBeEntered is set to False by default and that's why you can't enter it. Set it's default to True and it should work.

Vehicle movement is due to what you predicted i guess. I thought you had already set it up. Also have you considered using a pawn BP with a Floating Pawn Movement Component instead of vehicle for what you are trying to do? Or something like this?

avatar image AdamDoubleU Dec 13 '15 at 03:04 PM

I made a new BP which was a pawn called "Boat_01" I took the blueprint from the first boat and copied it to the even graph on my boat_01 It has references to the other boat on it so I deleted that and tried to change it to my new boat BP but things are different now It's not letting me "Set Boat" in the same way as the last one was and I can't plug in a reference to self in it or anything. I also deleted my other boat to make it easier but It's not letting me set it up how I had it before, Was that stuff "Vehicle blueprint" specific?

I'm gunna go through and try to remake the whole blueprint again, I'll report back if it works.

avatar image AdamDoubleU Dec 13 '15 at 03:36 PM

It worked I got everything plugged up right again, ignore that first message. Now I have a pawn, I tried to set the movement for it up like I have the movement for my character but no luck. I watched the tutorial you linked, will that work, while the boat is in the water? I'll have a go at setting it up when i get home but I have to rush out to work pretty soon.

avatar image Jacky Dec 13 '15 at 05:24 PM

It should work. You just need to add force or use a thruster component on X axis to make the boat move forwards/backwards.

avatar image AdamDoubleU Dec 13 '15 at 10:35 PM

I just tried auto-possessing the boat with player 0 in the drop down of the blueprint I looked at the nodes while I was doing it and everything was firing. (Pictured) alt text

Moving anything doesn't make the boat the move and when I make it my default pawn and play from here in the middle of the water nothing happens in the nodes and trying to move doesn't move.

5.png (2.6 MB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question