How to handle twin stick attacks? Plus bonus question
Semi-related: I want to switch the controls so that the left and right triggers make the camera turn left and right (around a character) respectively.
Main question, how do I go about assigning the direction of an attack to the right stick? I've set it so pointing the stick in any direction will do a front facing attack, but I can't figure out how to make specific directions turn the character and attack in that direction. I've set "turn to face" to be triggered by the right stick, but the attack triggers (instantaneously) before the character finishes turning as turn speed is maxed out at 573 degrees/s.
I'm thinking maybe there's a way to make it have a delay if it's pointing any direction other than straight ahead (aka up with the right stick)?
It kind of works as is, it's just that the delay is a bit annoying.
But yeah, absolutely no clue on how to assign camera turns to right and left triggers
-
I realize this is worded badly, woops. I was sort of typing it up as I figured things out and then posted when I couldn't progress any further.
What I meant is that if I'm facing forward for example and have the right stick pointing back, the character will turn as they attack. If I'm not moving I can attack again in that direction without a problem, but if I walk forward and try and attack in that same direction while walking, they'll turn around and attack before they complete their turn. So... it kind of works as is, but it means the character can't attack in any direction at any time like I'm wanting them to. -
Camera Turning:
Make a tag on the character around center of mass and have an invisible box follow/TP to this tag. On the box, put a camera gadget and position it back behind the box so the box is in view of the camera.
Wire L2/R2 into a Pos/Neg Combiner and feed this into a Rotator that spins around the y (vertical) axis.
Or use this: https://indreams.me/element/b4l0rJotirA -
Thanks so much! I'll give it a try in a bit and see how I go
-
Okay so update: it works perfectly fine on your puppet, but I had issues getting it working on mine. Tried doing the logic myself but couldn't, so I copied over your stuff.
Eventually got it working as expected, but now he flies up into the sky really fast and can't be stopped?
I can turn the camera with R2/L2 while he's flying, so that's a plus but I don't know if the flying is a bug or I've really messed up by copying the logic over lmao -
Is your box collidable?
-
Ended up figuring out that it wasn't collideable haha, all fixed now thanks for your help!
He is a skeleton so the box was getting stuck inside his ribcage and then trying to fly up to get to the tag. This made the whole puppet propel upwards
الرجاء تسجيل الدخول لترك تعليق.