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"

Instantly speed up the player

I'm creating a 3rd person game. I want my character accelerates suddenly when it hits an other mesh. I've already tried the Add force and the Add impulse nodes but it does nothing. What can I do ?

Product Version: UE 4.10
Tags:
more ▼

asked Dec 13 '15 at 04:12 AM in Blueprint Scripting

avatar image

cedric4096
41 2 5 6

avatar image ImperiumPandemonium Dec 13 '15 at 09:52 AM

Post a picture, it's easy, but can be done in different ways, depending on how you have set up your blueprints, so maybe a post of the character and the other mesh's blueprint.

But do you want the character to accelerate and hit another top speed and stay at the new speed? or a temporary acceleration that brings your character back to it's regular speed after acceleration?

avatar image cedric4096 Dec 13 '15 at 10:21 AM

Hi, thanks for your answer. It's a temporary acceleration I need. The character blueprint is the standard third person character blueprint with some fuctions for the hud. Here is the other mesh's blueprint :alt text

capture.png (79.5 kB)
avatar image ImperiumPandemonium Dec 13 '15 at 11:00 AM

Ok, I'll send a picture of how you can do it with an explanation, just opening up the editor

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

2 answers: sort voted first

Here you have a solution for the speedchange that works ok. And if you want to change animation speed (so it matches new temporary movement speed) you can do it by adding a bool that is "InstantAcceleration" that is set to true when max walk speed is set to 1200, and set it to false after the 5 seconds before itgoes back to 600speed. You can add this variable in either the static mesh BP or your character BP. The impoirtant thing is the casting in the animblueprint.

Then cast/call that bool into the AnimBlueprint and then create a new bool (in the AnimBlueprint this time) that is set to true whenever the called bool is set to true.

alt text

more ▼

answered Dec 13 '15 at 11:19 AM

avatar image

ImperiumPandemonium
152 12 12 17

avatar image ImperiumPandemonium Dec 13 '15 at 11:26 AM

You MUST drag out "as character" node and choose "Character Movement", then from the "Character Movement" you can drag out the "Set Max Walk Speed". Otherwise it won't show up at all

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

It works very good, thank you ! Can we also adjust the forward vector of the character to change his direction?

more ▼

answered Dec 13 '15 at 11:50 AM

avatar image

cedric4096
41 2 5 6

avatar image ImperiumPandemonium Dec 13 '15 at 12:04 PM

Do you mean so when you press "S" that the Char should move towards the camera? and not that the camera follows the back of the player?

avatar image cedric4096 Dec 13 '15 at 12:08 PM

No, when the character hit the mesh, it will have a new forward vector. The camera is still following the back of the char.

avatar image ImperiumPandemonium Dec 13 '15 at 12:14 PM

So you want to change the characters direction? Just set a new actor rotation, I'll open up the editor again an take a prntscreen of it

(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