Hi, I am trying to make two character move in the opposite direction of each other or in another word, the reflection of each other. For example, the first player move left then the other player would move right. However, I am not sure how to do that. I hope someone can help me with it, thanks a lot. Sorry for my terrible English. If u can, I would hope to get a picture of the blueprint or code. Thanks.
for reflective movement you would just need to multiply the direction by -1 for the axis you want affected. so for example if you were making one character move in +x then the other would move in -X, to get this you would take the standard input and multiply it by -1. if you look at the third person template character you could insert the multiply either in the direction or in the scale either one could work.
Thanks so much for your comment, if u can, are u able to maybe show me a picture of the blueprint because I am a beginner and not too much experience with the engine. Thanks.
hmmm i was trying to set that method up but seem to be having a input issue so maybe another approach will be better. I mean i can make something that works but you would need a reference to both characters.
Thank you for your help, are u able to maybe sent me a copy of the blueprint so that I can just copy the blueprint because I don’t know how to set the -x and -1. Thank you. If u do not have time for making the blueprint, that is alright. I will just try to work it out. Thank you once again.
by the way, I only want one of my character getting control, the other one can just move automatically and moving left and right is the only direction that I need, not sure if that would make easier for u to do.
i got something that works but to me it doesnt seem ideal. basically i used a event call to initiate movement in a second character that we already have a reference to. i used a interface but normal events would suffice i think. again its over complicated and not a ideal way to go about accomplishing the task at hand imo.
the picture should make things pretty self evident. the basic idea is that we are taking the input from the controlled character and passing its execution to the second via a custom event. through that event we are also passing the negated axis value (multiplied by -1). so if your player has a value 1 the other character will be -1. i should also note that i made the othercharacter variable public so it could be set in the level viewport though you could use any method to get the reference.
You can also simply make it for the reflection just negate the axis input value. That should work
DETRMINATOR20
thx, I will try now
I solve the problems thank you guys