Download

Rocket Take off

Hello,
I want to make a rocket take off, with a speed which varies according to the mass of the rocket, which must therefore also vary according to the quantity of fuel, which goes down gradually, logic. But I have no idea how to do this, I have recently been using unreal and have searched, but found no.

Ah and sorry for my English, I’m French. I hope the message will still be clear.

Full physics simulation, or just something that looks like a rocket lifting off?

I don’t want to do a full physics simulation, it’s to later control a rocket and do it as realistically as possible. I wanna make a game (just to make it clear).

Ok, then you can just do the math in blueprint ( I don’t know what calcuations you want to use ).

But the main problem is that I would just like to have a move on the Z (in height) for my rocket, but I don’t know how. If I press a key (for example space-bar), it turns on the reactor, and if I press the same key again, it turns it off.

The rest of the math I think I can do, but that I am not able to, like I said I am not yet comfortable with unreal engine.

You can just add to Z on tick:

Screenshot_1.jpg](filedata/fetch?id=1852866&d=1610717176)

ezgif.com-optimize.gif

I just made the rocket from 5 cones and a cylinder, then select them all and:

Screenshot_2.jpg](filedata/fetch?id=1852872&d=1610718124)
( choose ‘harvest components’ )

Thank you so much.
So if I want to change the value, I just have to add variables?
Another question: is it possible to change the weight of an object using a variable? Or do I just have to remove the default weight?

If you’re not using physics, you don’t need to do anything about the weight. All you have to do is change your formula going into the Z on that node :slight_smile:

Also, better if you do the propulsion like this, then it will work at the same speed on any system:

](filedata/fetch?id=1852883&d=1610719395)
I currently have the velocity set to 100, but that’s where your calculation should end up connecting.

Ok thanks.
But I just realized that your method didn’t work. I run the game and nothing happens.
You should know that I also added another command in the script, for the camera (it only works halfway). Also, i used the FPS base content.
Do I have to change something in the project settings, or elsewhere?

I’m using FPS. Show me the code…

Here is what I did. “Fusée” means rocket and “Déplacement” means move.
I do the same thing for a pawn, for the same result.

What did you set velocity to? It needs to be >= 100

I tried several velocity, and there I set it to 100,000 for example…

Oh, I didn’t say it but I don’t put it in the scene, I assigned it to the player, so it only appears when I launch the game.

I also tried to see where the problem was, all values display correctly, there are no issues with the “event tick” block. The only place where the problem could come from is in the “actor” block. Or the character himself.

Ah, it’s a character, you didn’t say that… :wink:

I think it might need to be just a blueprint, but then I’m not a character expert…

Maybe enable flying in the character movement component.

It doesn’t work either. I will try something else.
I have another problem with my camera. It’s just doesn’t work. Anyway, when I was rotating, it wasn’t just the camera that was rotating, but the whole object. Is there a way to make a camera that rotate around the object and not with it?

I succeeded! In fact there was a problem with the orientation of the rocket, since I took an in-line model I had to turn it, which also turned the axes. By cons I still had to change the movement block, but I finally have something good.

But I still have my problems with the camera, do you have a working program for that?

It’s to do with the hierarchy in the components:

Screenshot_1.jpg
This is just the first person, but the principle is the same. See how the Mesh2P and FP_Gun etc is connected to the camera? That means, when you move the camera, every moves with it.

Your problem, is the camera is connected to the mesh, you have to drag the camera onto the root:

Screenshot_2.jpg

This will detach it.

It may not be possible depending on how you built your pawn.

I can’t do what you say, and when I switch the position of the camera and the mesh (the camera before the mesh, in tree order), my game goes crazy when I run it. I may be looking for other ways. But you still helped me a lot and thank you for spending so much time for me.