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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

STOP moving with moving platform

Ok, I have a platform that is moving between two vectors using a lerp and a timeline. Nothing fancy. When I step onto it with my character the character moves with it, which admittedly is what you would want to happen 99% of the time. I want to stop that. I can't find a way to turn off that functionality in blueprints, though I'm sure there must be a simple solution.

What I would like to happen is the platform to move from point A to point B (as it does) and the character can step on it, but not move with it. I'd like the platform to block the character from falling through (as it does) but I want the player to need to follow the platform via their own inputs, and if the platform moves from underneath them they would fall off.

Any suggestions would be greatly appreciated.

Product Version: UE 4.17
more ▼

asked Dec 07 '17 at 01:38 AM in Blueprint Scripting

avatar image

138 1 6 6

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

2 answers: sort voted first

You would need to have some sort of trigger volume on your platform, when the character is on the platform use a tick gate to set the current position to the position it was last frame but factor in changes in the characters input movement. Someone else may have another way. Let me know if that helps.

more ▼

answered Dec 07 '17 at 04:53 AM

avatar image

406 1 6 8

avatar image Arceyo Dec 07 '17 at 02:20 PM

Yeah I feel like that would do it, I was just really hoping to avoid doing it on tick. I was thinking since people usually have issues with moving WITH a platform, that doing the opposite would be a relatively simply thing. Either way, I've thought of a different way to achieve the effect I'm going for, but thank you the same.

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

I know it's kinda late, but I found a way. It's not in blueprints however. I wanted to make characters be able to jump on each others head, but dont follow as the lower one walk away.

In C++, I made my own character movement component, derived from CharacterMovementComponent. Then you override the UpdateBasedMovement, check if the current "base" you have is something you want to follow or not. If not, then just return.

My code( AFoobarCharacter is my player character, but it you could define your own logic ) void UFoobarCharacterMovementComponent::UpdateBasedMovement( float DeltaSeconds ) { if( !HasValidData() ) { return; }

     const UPrimitiveComponent* MovementBase = CharacterOwner->GetMovementBase();
     if( !MovementBaseUtility::UseRelativeLocation( MovementBase ) )
     AActor* AttachedActor = MovementBase->GetAttachmentRootActor();
     if( AttachedActor && AttachedActor->IsA( AFoobarCharacter::StaticClass() ) )
     Super::UpdateBasedMovement( DeltaSeconds );

This allowed my character to stand on other characters, but not follow their movement. Probably you should do this to your moving platform, with a more refined condition. (maybe actor tag "dontfollow")

more ▼

answered Dec 11 '18 at 11:32 AM

avatar image

83 8 5 12

(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