I’d like to add a projectile weapon to my vehicle, how can do I do it?
I don’t need to physically add the mesh for the gun, only the projectiles, something like a sphere shot forward.
I searched the forums but I didn’t find anything about it, can someone help me or point me to some docs or tutorials?
The projectile doesn’t seem to behave correctly: in the image the car is turning, the projectile spawns at the location and rotation of the arrow but it should travel along the black line, instead it just seems to go along the tangent, I guess.
I think that the projectile spawns well, but you toke this screen some secs after the projectile spawned, so its normal that if the vehicle is moving it seems like what youre saying
Moreover, your drawed line is not very well calibrated, if you see it with detail, the location of the projectile is not much diferent than your “ideal” line, so I think that this confirm my first mentioned theory.
Just fire the projectile with the vehicle stoped, if it spawns well, move the vehicle to another location, stop it and fire another projectile, it should spawn good again
I took the shot just a spilt second after the projectile has been fired: I was using one hand to steer, accelerate and fire and the other to take the screenshot and I was trying to get a picture as clear as possible.
The projectile spawns correctly and the graph works, there’s no doubt about it, It worked good with the setup by jacky too, both setups do just fine apparently and honestly I’m happy with that.
It is basically what I was trying to say in the 3rd post of this discussion, **** language barrier.
The projectile behaves correctly, but, how can I make the projectile keep more centripetal force than it has now? I would like to make some testing about this.
Honestly I don’t know where to begin from.
Ok, many thanks, I think lateral forces could be the right way to achieve this, I need to learn more about this.
Right now I’m trying to make the projectile system a little more complex: when a shot is fired a given amount of points (20) are drawn from the total (100), then it should start to “recharge” from new total (80) and get back to 100.
I’m trying to do this with a timeline but I can’t make it to start from where the shot is fired (80).
I tried with the SET PLAYBACK POSITION and SET NEW TIME nodes but apparently don’t work, I don’t understand what I’m doing wrong.
Today I kept working on it, I’m loggin in just now so I didn’t read your answer, and managed to get it working.
Basically I was setting a new time in the Timeline that was higher than its maximum value I didn’t get that with timelines you have input time values within the timeline length.
I feel so noob…
However the recharge system works just fine.
Is there a way to screen capture the whole BP 1:1 zoomed?
I tried to make sort of a mosaic with multiple screen captures but it is a nightmare.
I’m trying to make another type of projectile: what I have in mind is something which can be fired from the vehicle while it is running and that kind of follows the track until it collides with a target.
I made some experimenting, a BP with the following components: a static mesh, a spline and the logic to move the static mesh along the spline.
I added the BP as a child actor in the vehicle BP and spawned it using the Spawn Actor Node. The projectile spawns at the desired location but it behaves strangely: the mesh moves much slower than it should and the changes to the spline in the parent BP doesn’t affect the path of the projectile spawned in the vehicle BP.
In my understanding I need to get the spawning point of the projectile, spawn it, make it travel to the position of the nearest spline point and then make it to move along the spline from that point.
Now I’m wondering what could it be the right way to do it: should I use a projectile component and move it along the spline? Is it even possible?
Should I use a static mesh?
Should I use multiple BP, one for the spline, one for the projectile component and one for the vehicle?