I really don't understand what's the whole point of setting velocity inside the bullet blueprint. The only reason it didn't work for you is because before you hit play you set the velocity to x:0, y:0, z:0 at 16:55, I think you get the exact same result skipping everything you did from 17:00 to 20:00 just by putting "get actor rotation" on the bullet transform like you did already at 16:20. Also what you achieve by multiplying with the bullet speed variable is pretty much overriding "initial speed" on the ProjectileMovement component of the bullet so setting that to 1000 instead of 600 is the same thing.
+ChuckyVon Just to be clear my intention was to know what's actually going on rather than correct you as I'm a beginner myself and want to get behind the logic rather than just copy what you do. Also since you asked for suggestions (though this would take probably few videos on its own) would be a tutorial about how to make procedural rooms for this game (similar to binding of isaac) since there isn't a single tutorial about something like this other than the 100min epic games video which isn't really a tutorial.
Οικονόμου Βασίλης Actually, procedural rooms aren't that difficult in Unreal engine. I'll post a video soon! It uses similar logic to the epic game tutorial on an endless runner. For a basic rundown, when the player walks through a door, a new room is chosen from an array of pre-made rooms. This doesn't limit you on the randomness because in each room you can have areas to spawn random enemies, consumables, chests or whatever you want. I have the system all set up in my project "Break Free" that I have 2 videos up about but I'm not sure if I go over this system in detail.
+ChuckyVon The thing with endless runner is that you don't really care about anything other than spawning rooms one after another endlessly and deleting the previous ones as you go, pickups enemies etc also aren't an issue. The complex part is making sure after a room spawns that it won't have a door leading to a previous room that didn't have a door where they connect because you'll hit a wall or even have a new room spawn and overlap and also making sure that all paths actually end rather than have doors that drop you off the map.
I know this was a year ago, but what exactly do u mean? Im asking cuz I cant progress with the tutorial, I did everything corretly yet my bullets always shoot upwards instead of following the mouse and I cant find the problem
So, I did some very in-depth checking and i can get it to spawn the object in the direction I am facing, once I try to change its velocity in the bullet event graph it only fires in one direction with some changes. Or I can get it to fire in my direction however the bullet always spawns either in front to the side or in back of the actor. I've tried at least seven different ways to do this including pulling the shooting functions from other templates and none seem to want to work. Have you had a chance to look at the latests version of UE to see if you're having similar issues?
Sorry I haven't been able to get back, I just got home from vacation. I haven't looked at UE in a while. It *should* work. I say that because the only things i used to get the bullet in the right spot were actor rotation, actor location, and math nodes. I'm pretty sure none of that will be changed. I'll look at is soon but it'll be a week or so. Thanks for looking into it! I know you said you've checked a few times but from what you're telling me I can see where you might've strayed. Makes sure you're using the character's "Yaw" in the "Shoot" function of the player Make sure when you're aiming, you're rotating the whole character blueprint and not just the sprite component. Check that in shoot that the "Get Actor Rotation" node is connected to the "Spawn Bullet" node Make sure that the "Set Velocity" node in the bullet blueprint is connected to "On Begin Play" Regarding the last one, try connecting the "Set Velocity" node to a different even, I'm not sure if they've changed those. Also check that the bullet isn't colliding with the player when it spawns. That's all I can give you right now but I will look into it ASAP! Thanks for watching and I hope you enjoyed the series up until this!
I had this issue as well but have found a solution, if you don't haven't got one already and still want it, message me and I can give you the link to picture of the blueprints that fixed the issue for me.
Hey Mate following along in 4.9 and having a little trouble getting the projectile to follow the player rotation. it always shots the same direction. i've gone through twice and made sure all my sine and cosine are linking to correct x and y. any other ideas?
Hey Anase i end up fixing this by changing method. instead i added a projectileMovement component into the Actor and removed the rest. seemed to work find i also added a shooting function to the character. That controls the direction. www.dropbox.com/s/nhln6igulenjjmo/Nodes.jpg?dl=0
Glzmo I don't know how, but my system started working fine on its own. I think we just had to watch the rest of the video, because he experienced it too, and then fixed it as he finished scripting the system.
It does let you fire vertically but nothing seems to make the projectile fire from the orientation of the player. It's as though the spawn x y are stationary even though the player is rotating.
I really don't understand what's the whole point of setting velocity inside the bullet blueprint. The only reason it didn't work for you is because before you hit play you set the velocity to x:0, y:0, z:0 at 16:55, I think you get the exact same result skipping everything you did from 17:00 to 20:00 just by putting "get actor rotation" on the bullet transform like you did already at 16:20. Also what you achieve by multiplying with the bullet speed variable is pretty much overriding "initial speed" on the ProjectileMovement component of the bullet so setting that to 1000 instead of 600 is the same thing.
+Οικονόμου Βασίλης You're completely 100% correct but I didn't realize this until after the fact!
+ChuckyVon Just to be clear my intention was to know what's actually going on rather than correct you as I'm a beginner myself and want to get behind the logic rather than just copy what you do. Also since you asked for suggestions (though this would take probably few videos on its own) would be a tutorial about how to make procedural rooms for this game (similar to binding of isaac) since there isn't a single tutorial about something like this other than the 100min epic games video which isn't really a tutorial.
Οικονόμου Βασίλης Actually, procedural rooms aren't that difficult in Unreal engine. I'll post a video soon! It uses similar logic to the epic game tutorial on an endless runner. For a basic rundown, when the player walks through a door, a new room is chosen from an array of pre-made rooms. This doesn't limit you on the randomness because in each room you can have areas to spawn random enemies, consumables, chests or whatever you want. I have the system all set up in my project "Break Free" that I have 2 videos up about but I'm not sure if I go over this system in detail.
+ChuckyVon The thing with endless runner is that you don't really care about anything other than spawning rooms one after another endlessly and deleting the previous ones as you go, pickups enemies etc also aren't an issue. The complex part is making sure after a room spawns that it won't have a door leading to a previous room that didn't have a door where they connect because you'll hit a wall or even have a new room spawn and overlap and also making sure that all paths actually end rather than have doors that drop you off the map.
I know this was a year ago, but what exactly do u mean? Im asking cuz I cant progress with the tutorial, I did everything corretly yet my bullets always shoot upwards instead of following the mouse and I cant find the problem
So, I did some very in-depth checking and i can get it to spawn the object in the direction I am facing, once I try to change its velocity in the bullet event graph it only fires in one direction with some changes. Or I can get it to fire in my direction however the bullet always spawns either in front to the side or in back of the actor. I've tried at least seven different ways to do this including pulling the shooting functions from other templates and none seem to want to work. Have you had a chance to look at the latests version of UE to see if you're having similar issues?
Sorry I haven't been able to get back, I just got home from vacation. I haven't looked at UE in a while. It *should* work. I say that because the only things i used to get the bullet in the right spot were actor rotation, actor location, and math nodes. I'm pretty sure none of that will be changed. I'll look at is soon but it'll be a week or so. Thanks for looking into it! I know you said you've checked a few times but from what you're telling me I can see where you might've strayed.
Makes sure you're using the character's "Yaw" in the "Shoot" function of the player
Make sure when you're aiming, you're rotating the whole character blueprint and not just the sprite component.
Check that in shoot that the "Get Actor Rotation" node is connected to the "Spawn Bullet" node
Make sure that the "Set Velocity" node in the bullet blueprint is connected to "On Begin Play"
Regarding the last one, try connecting the "Set Velocity" node to a different even, I'm not sure if they've changed those.
Also check that the bullet isn't colliding with the player when it spawns.
That's all I can give you right now but I will look into it ASAP! Thanks for watching and I hope you enjoyed the series up until this!
I had this issue as well but have found a solution, if you don't haven't got one already and still want it, message me and I can give you the link to picture of the blueprints that fixed the issue for me.
Hey Mate following along in 4.9 and having a little trouble getting the projectile to follow the player rotation. it always shots the same direction. i've gone through twice and made sure all my sine and cosine are linking to correct x and y.
any other ideas?
+Glzmo
I'm experiencing the same issue. If I fix it, I'll let you know.
Hey Anase
i end up fixing this by changing method. instead i added a projectileMovement component into the Actor and removed the rest. seemed to work find
i also added a shooting function to the character.
That controls the direction.
www.dropbox.com/s/nhln6igulenjjmo/Nodes.jpg?dl=0
Glzmo I don't know how, but my system started working fine on its own. I think we just had to watch the rest of the video, because he experienced it too, and then fixed it as he finished scripting the system.
my bullets are not colliding. I set on dynamic collision and followed the tutorial as it is
Thanks for an awesome tutorials dude, that's really cool
Thanks for the video!
you should do more tutorials like this even for unity
my bullets don't collide .Help?
BTW your tutorials are really good and are inspiring
They don't collide with what exactly? Walls and such? Make sure the Sphere has dynamic collision on.
+ChuckyVon yep its on but still wont work
Doesn't work in newest versions.
Andrew Moore can you tell me specifically what doesn't work in the new versions?
The projectile fires only across the x axis, doesn't follow the actors rotation. I've triple checked the BP layout and it doesn't seem to work.
It does let you fire vertically but nothing seems to make the projectile fire from the orientation of the player. It's as though the spawn x y are stationary even though the player is rotating.
Why have I never heard of sin and cosine before?
sine**
+Spyder Cat
Probably because you haven't done much high school math.
+Anase Skyrider It was a joke. I'm in AP Calc BC.
I also know ChuckyVon personally and we were joking at the time about trigonometry.