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"

Detecting slope not working

Hello kind peeps! I am having lots of trouble with a very simple script and it's driving me crazy. All i'm trying to do is to have a boolean detecting if my character is in a downwards slope in order to multiply it's speed. I have seen multiple solutions that never work despite copying them exactly. I've tried Line tracing from my actor , breaking the hit result, taking the impact normal, breaking the vector to get the pitch, or using current floor, breaking the hit result of that, using the impact normal to get the pitch, i also tried using the hit actor/ actor rotation to get the pitch, didn't work either... When checking the values in game, the problem is that the values don't update at all (my script is on event tick), for example the pitch value will be of 0.00000, or of 66.randomnumbers depending of the solution, but none of the values of the vector will change, THEREFORE i'm pretty sure the problem is on my Hit (doesn't hit the ground right or something?); it's also maybe on the way i try to get the rotation of the ground. I am lost, and can't find any tutorials or already asked on the forum questions/answer to help me. I would LOVE some help. Thanks :)

Product Version: Not Selected
more ▼

asked Jul 17 '17 at 05:43 PM in Blueprint Scripting

avatar image

1 2 5

avatar image Devel Jul 18 '17 at 02:35 AM

If you are using Landscape, I have had some success getting the Impact Normal by setting the Default Phys Material for the Landscape object found in the World Outliner, AND/OR setting the Phys Material in the Landscape Layer Info Object, which is listed under Landscape: Paint: Layers. If you already have these set, you could turn on debug for the trace to be certain the trace is where it needs to be.

avatar image LeScorpion Jul 18 '17 at 06:37 AM

Thanks for the reply! I'm not using Landscape but simple blocks. I'll try changing the phys materials though. I don't know how to set the debug for the trace but that will probs help me, i'm gonna look for some info on that. Thanks for the kind help.

avatar image LeScorpion Jul 18 '17 at 06:43 AM

Hey! I finally got it, I can't believe it how dumb the answer was, and how much hours i spent trying to solve it the hard way. I had never enabled the "collision generates hit events" in the details of the object. Doing that made everything work as intended. Sorry for the annoyance.

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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