Disable moving pawn with platform
Hi I would like to know if there is a way to avoid moving pawns that stand on a platform which is moved with SetXXXLocation() in code.
The platform is moved very far away - and the pawn standing on it will practically teleport to that new location.
asked Mar 12 '15 at 02:24 AM in C++ Programming
I believe the "problem" is a feature where a Pawn can be "based on" another primitive component, and when that based on component moves the Pawn will move with it. A Pawn is usually "based on" whatever it is currently standing on. You can disable this for an actor by turning "Can Step Up On" to false, but your Pawn may bounce around when on the platform.
There isn't a way to manipulate what a Pawn is "based on" in Blueprint, but in code, the best way to handle this is to probably call a SetBase(NULL) right before your SetLocation calls.
If you want to do this in blueprint but still are using C++, you can create a BlueprintFunctionLibrary function that would call SetBase(NULL) on an ACharacter.
If you don't want to do this with any C++ at all, you might be able to achieve this buy applying an upward force on the character or really any force that would cause the character to no longer be "based on" or "standing on" the platform when the platform is moved.
answered Mar 12 '15 at 02:54 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here