Hello! I’m extremely new to Unreal so sorry if I’m a little slow with everything. I’m trying to create a setup where the user can use the left and right keys to rotate a cylinder (will later be a lighthouse mesh with a light attached). I suppose I’m a little confused on how to get this to happen in the blueprints for the lighthouse. Could anyone point me in the right direction as far as resources to learn how to do this? Thanks!
It’s very simple to make, but as I was making it I realised there’s a whole loada stuff you need to know. I will try and get it all in here. These are the basics.
So I made a cylinder lighthouse, it’s just a cylinder in a BP:
The code looks like this:
This is me pressing L and R:
Some things you need to know:
You need to enable keyboard input. Class defaults ( top row ), ‘auto receive input’ player 0.
You need to understand about scenes in a BP. You’ll notice I didn’t just plonk the cylinder in there, there’s a scene as it’s parent. You’ll find that 99.99% of the time, when you’ve got your BP looking how you want, the components will have non zero transforms. In other words, if you click a component and look at the details panel, the location and rotation are all over the shop. That’s not good when you want to animiate things. Enter the ‘scene’ component.
If you need a scene component, here’s how to put one in. Let’s say you’ve positioned your cylinder just right, and it has a non-zero transform. Do this:
a) Click the cylinder ( in the components list )
b) Select ‘Add component’ and choose ‘scene’ ( this makes your component the parent of the scene )
c) Drag the scene ONTO your component ( this de-parents it )
d) Drag your component onto the scene ( this makes the scene the parent of your component )
e) Voila, your component now has no transform
Tell me how you do ( you need to quote me otherwise I don’t know ).