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"

Collision capsule sticking?

I'm not sure if this is a bug or if I'm missing something, but I'm noticing a weird type of behavior with character collisions that I want to eliminate.

The following video should hopefully demonstrate the issue; note that during this video I never stop holding the forward key.

https://www.dropbox.com/s/vgxofbya7tf076o/CollisionIssue.webm?dl=0

When the player collides with the wall, his movement is partially obstructed, and he continues as best he can. Since he cannot move "fully forward", he instead sort of slides along the wall in the closest possible approximation of the movement input.

When he collides with the enemy's capsule, however, this doesn't happen. If his capsule cannot move the way it's supposed to, it simply stops entirely. This makes moving the player near enemies impossible since the player gets stuck on them unless he moves at exactly the right angle.

How do I change the way the player movement works so that the player always Attempts To Move even if he cannot?

Product Version: Not Selected
Tags:
more ▼

asked Aug 29 '14 at 04:55 PM in Using UE4

avatar image

RhythmScript
243 20 24 36

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

2 answers: sort voted first

Nope, both are capsules. The player has a fairly wide capsule (not wide enough to render it spherical) while the enemy has a very narrow one.

I actually managed to solve the problem, albeit by setting the enemy capsule to Can Step Up On (ECB Yes or whatever it's called).

No idea why that should have fixed it, but it did.

more ▼

answered Aug 29 '14 at 06:06 PM

avatar image

RhythmScript
243 20 24 36

avatar image Doug E ♦♦ STAFF Aug 29 '14 at 06:16 PM

Glad to hear you're working again. Out of curiosity where is your capsule component in relation to the other components of your character? Is the capsule component the root or is something else?

avatar image RhythmScript Aug 29 '14 at 08:53 PM

Actually, while my player's capsule is the root, my enemy has two capsules. the root capsule is used for driving the enemy around the level (i.e. it interacts with worldstatic and worlddynamic volumes), though the player can pass through it. The enemy then has a much smaller inner capsule for blocking the player.

This is done because the player's capsule is rather large so that he can interact with level geometry properly without clipping through it constantly, and if he were to interact directly with the main capsule of the enemy he would be very far away from it. So instead he can pass through the enemy and then collides with a secondary collision shape at its center, letting him get closer without passing through the enemy. That may have been the cause of the conflict, but it still seems strange that there would be such a disconnect between the way certain collision primitives affect player movement.

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

Hey RhythmScript-

From your video it appears you are using a sphere component to detect collision for your player (and possibly the enemy as well?) If you remove the sphere component and instead use a capsule component you should get the behavior you're expecting.

Cheers

Doug Wilson

more ▼

answered Aug 29 '14 at 05:22 PM

(comments are locked)
10|2000 characters needed characters left
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