Hello!
I have the basic lamp from the starter set and I wanted to make the light source sway around a little bit by just having the object rotate on the x axis. In my flow I have tried to outline what I’m logically trying to do. So when the player approaches the area I call the function SWAY, which then looks to see if ticker is true (player is on the box collider) then it checks if Upswing or DNswing is true. For ease I thought I would set UPswing to true and DNswing to false, so that the object always starts swinging towards the positive side of the x axis. I then want this object to swing WHILE under 10 degrees, once it hits 10 degrees, than I want DNswing to be true and it will go until -10 degrees.
I can get the object to move, but I haven’t been able to do it smoothly, it will go 10 degrees positive and then restart back at 0, or completely crash. I think I must have something wrong with my logic with While Loops (As I tend to always have issues with them). If I was coding I might do a FOR Loop, i=0; i<11, i++ something like that, but I’m not sure how to do that in blueprints.
If anyone has suggestions it would be appreciated!