Ok so my basic setup of the characters allows me to shoot left and right (basically, because it can actually even shoot in my face aswell).
My first question is how should i setup the character to shoot in all angles? (90, 45, 180 etc). I’ll add a picture showing you what i mean. BLUE ARROWS = the way it is shooting now, RED ARROWS = what i need to add to it.
My second question is how can i stop the character from rotating, or making him unable to stop while pointing at me (at the screen). My character rotates 360 degrees when i need to turn left or right, this way making him able to even shoot at the screen. What i want is to make the rotation smoother (or faster?) and once he’s rotated left or right, to lock him in place until he wants to turn to the other direction (if he’s going right, when he wants to go back, or shoot back/left, i want him to rotate directly to the left instead of making a 180 degree rotation which makes him able to shoot at the screen).
Hopefully my first question will be answered, i suppose i could figure the second one out if no one can help.
Hi man , its simple but you need to be more clear.
i dont understand wich kind of Actors or blueprint you have.
There are a good dozen of possibilities.
Its a soldier character ive created, its pretty much the same thing as the SideScroller character, but with custom model and animations. The weapon was added separately within a finger socket of my model (added a child socket for the weapon) . On the weapon i added a “bullet” start point (hidden in-game) from where the bullets go in that direction. My character will always shoot where he is pointing the weapon, however i have no idea how to make him point the weapon in other directions (excepting the basic character rotation) .
I suppose making him rotate from the hip to point the weapon up and down could work ? Yet i have no idea how to do that.
I hope i made it clear enough. I’ll upload some screenshots of my model if this doesnt give a good explanation of what im actually using. Thanks.
You should put in you character some more animation like Aim UP, Aim Down.
Maybe you need to separate the upper model from the lower model, so you can keep running. and aim everywhere.
In this case you will have to up some controls for the animation , but you will keep firing toward the gun.
Sure you can also , just spawn bullets in every direction. ignoring the direction of the gun.
To do so, you can just spawn yourbullet in a circle around the gun , and aim every bullet to his direction.
To do both those things:
Use the node “get forward vector” on your gun, if you have done well it should aim forward.
Then you have to do 2 step, first Rotate the vector using a rotator. and then Add the rotated vector to the socket location.
Doing this you will have the location of N points around the socket location. from where spawn bullets.
You can increase the radius of this circle , multiplying the forward vector with a int before do the other steps.
For the Char rotation you can istantly flip his direction by rotating the Whole pawn or actor of 180°.
If you want keep the smooth rotation and make it stop exactly on the left and right.
you have to put togheter some variables … i already made an answer for that here
Thanks for your answer, my problem is → how would i go to set up the aim up/down animations to actually play ? I have no idea how to set up more than the basic animations (running/jumping)
Edit: also i dont understand anything from that link you gave me, sry, im kinda noob, still learning my way through the blueprints