### Search in Sort by:

 Everything Blueprint Scripting Current Space

### 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"

# Calculating Walk Speed Based On Slope and Direction

 0 So I'm working on movement for my first-person character and I want to slow the player down when travelling up slopes and speed them up when travelling down them. So far I have discovered that you can get the floor normal from the player character movement component: Which is great, however my problem is that I need to somehow take this normal and check it relative to my movement direction/velocity (not my facing direction, due to strafing etc.) so that I can determine if I'm going up or down a slope when i'm moving. This is where my mathematical knowledge falls short unfortunately, so any help on this would be much appreciated! Thanks. Product Version: UE 4.21 Tags: slope1.jpg (54.0 kB) more ▼ asked Jan 04 '19 at 10:04 PM in Blueprint Scripting brisck1 100 ● 6 ● 14 ● 18 add new comment (comments are locked) 10|2000 characters needed characters left ▼ Viewable by all users

 0 I think the special sauce you're looking for is the vector dot product. For two normalized vectors, their dot product will be 1 if they point in the exact same direction, -1 if they point in exactly opposite directions, or 0 if they are at a right angle to one another. This means that `surfaceNormal (dot) walkingDirection` will return 0 for a flat/horizontal surface, increase toward +1 for when moving downhill, or decrease toward -1 for an incline/uphill. Given that, I think you're looking for something along these lines: https://blueprintue.com/blueprint/0zwq81_d/ blueprint-incline.png (210.4 kB) more ▼ answered Jan 06 '19 at 05:57 AM Neverender 51 ● 1 ● 7 ● 7 add new comment (comments are locked) 10|2000 characters needed characters left ▼ Viewable by all users