Hello i’ve made a blueprint script where when i click for example right mouse button it tells the bullet to stop.I’m using the stop projectile movement immediately node for this since i can’t get the constrains to work properly.Anyway i would like to get the location when the bullet is stopped but if i set a variable where it gets the bullets location it gets the wrong location.Does anyone have any suggestion how i can proceed from this?
I create a new variable for vector and i get the location right after it stops the bullet at least in the blueprint and then i set it to the location of the bullet
Sorry for the silly question but how do you know it is the wrong location? Like what else are you trying to do that makes you realize the bullet is in the wrong location?
Yeah but i stop it and it starts falling to the ground. So i tried setting it to that location where it stopped and started to fall to see if i got the location right
Sorry for the confusion
You can change the “gravity” setting on the projectile movement that will keep it from falling. Otherwise you can just save the world location and delete the actor then it won’t have the ability to fall. Again not sure what the “over all” goal is with getting the location if you could explain the set-up and desired functionality more I could give you a better answer.
I want to make it like example : Shoot the bullet forward when the player decides to stop it he can with a right button.When it’s stopped i want it to slowly fall to the ground(some sort of timer).While the bullet is slowly falling i want the player to be able to teleport to that location where the bullet was stopped.If the bullet collides with anything it’s destroyed and you can’t teleport there
Also, reading your latest comment, if you save the “bullet location” on the bullet BP and it gets destroyed you can’t teleport there because you lose that data of where the bullet is when you destroy the BP. If it is stored on the player you need to properly reference the bullet to get the spawned bullet’s location within the player BP.
Oh ok i’ll try saving the location in the player bp.I’ll try redoing it tomorrow it’s getting a bit late. Will let you know if what you suggested helped me out. Thanks for the help either way
It works now. I guess i had to destroy the actor before moving the player to that location or i had t move the stop bullet function onto the player bp instead of the bullet bp
Doubt i would do it without you so thanks i’m gonna try and learn to constraint that bullet since i don’t like the stop movement immediately. Just need to find a good tutorial do you maybe know of any ?