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 move actors using local variables and return left, right top and bottom collisions?

Hello. I'm creating a custom movement using values such as X Speed, Y Speed, X Position and Y position. Right now I have line traces running from the root of an object to a set position around it to check for collisions but this can be expensive if there are lots of actors on screen. What I'm trying to figure out is how to move the actor using these variables while returning proper collisions from whatever collision object I'm using and how to prevent it from completely stopping when a sweep is checked on. My other issue is that when turning a sweep off and moving with these values, if the X or Y speed becomes too high, the actor will get stuck in the ground or there will be an incorrect collision return such as the right line trace colliding with the ground, simulating hitting a wall. Is there a proper way to set up actor movement? Right now I have it set as "Set Actor Location" and I plug in the values.

What I ultimately want to do is have one collision object and no line traces running for collision checks. I want to be able to move the actor at any speed I want without it going through walls/floors. I also want to be able to check the specific types of collisions like left, right, top and bottom. Is this possible? Would anyone mind helping me out?alt text

Product Version: Not Selected
spp.jpg (433.4 kB)
more ▼

asked Oct 22 '14 at 02:26 AM in Blueprint Scripting

avatar image

Streak Thunderstorm
6 1 3 3

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

1 answer: sort voted first

If you use a Character type of Blueprint you have the option to use "Add Movement Input".

It basically does the same as "Set Actor Location" but you only have to specify a movement vector and it's speed. The actual difference will be handled by that node. Additionally it already takes collision into consideration. To get the location you can simply get the Hit result and check where the hit location was, check it against your root and you can calculate if it was top, bottom, left or right ;)

more ▼

answered Oct 22 '14 at 11:05 AM

avatar image

5.9k 291 86 293

avatar image Streak Thunderstorm Oct 22 '14 at 03:19 PM

That's not what I want though because the movement component is limited for the application I want to use it for.

I already have most of this type of movement done: http://youtu.be/EcvFFnoWmwk

I just want to tighten up my collisions so that I don't have limits on the speed I can travel. I noticed in the flying game template, you can pretty much move at an infinite speed and you wont fly through walls. I can't figure out how to replicate that with multiple variables.

(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