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 to create steering for a bike?

Hello

I am new to UE4 so have mercy! I am working on a small game, where I have a 2 wheeled bike. I use the rear wheel to accelerate the bike and I want to use the front one to turn the bike left or right; like a real bike. I've made the acceleration with blueprints, and I've tried to make the steering with blueprints aswell, which has not worked out at all. I am also open to any C++ suggestions! I know C# but C++ is something completely new to me.

My bike consists of 4 static meshes, Body, Front Wheel, Rear Wheel and the Front forks. How would I make the bike steer? I've tried many different blueprint ways, none of them seem to work the way I want them to. Would it be easier for me to end up to converting to a bike with bones or what? I am an open book so tell me as much as you can!

Meshes and Variables Accelerate and Change Gears Accelerate RPM

Product Version: UE 4.17
Tags:
more ▼

asked Nov 13 '17 at 06:32 PM in Blueprint Scripting

avatar image

DeniedNetwork
1 1 1

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

1 answer: sort voted first

I think if you can get the Z-axis rotation from the front wheel and check how far it's rotated from it's neutral position (which would have to be the forward direction the entire bike is pointing to) and in what direction (either left or right), you'd have a value you can then connect to a "addactorworldoffset" node. This node will make your bike move in the direction you specify. I'm not sure how to do the math to make this work however, which is why I came looking for answers myself.

You do need to do an "add timeline" node (which is like a forloop but better for things like this) so you can make it execute constantly. Double click on the timeline node to open up a menu where you can tick a box that says "loop"

I'm also new, so if my advice gets you in more trouble then you are now, I'm probably wrong.

edit i looked at your screenshots and saw you used the event tick to make the thing execute constantly, so forget the part about the "add timeline".

However you can only have 1 event tick, so if you want to add other stuff to the event tick, you'll have to "add custom event", plug the thing you now have directly connected to your event tick into the custom event we've just created, and then go to your event tick and type the name of the custom event.

You'll be able to add multiple custom events to the event tick. alt text

more ▼

answered Nov 18 '17 at 03:11 PM

avatar image

DarkWave0
10 1 2 6

(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