Download

Adjusting an Objects Transform, Rotation and/or Scale Through Blueprint

This sounds like it is the easiest thing to do in the world but I can’t seem to quite figure it out. Honestly I couldn’t figure out how to do this in UDK3 via Kismet either.

So how would I change the Transform, Rotation and/or Scale with Blueprints?

I’ve been trying to Get The Rotation then Set The Rotation but something isn’t working.

So I’ve gotten the rotation working but I am still lost on storing the rotation and then modifying that value. It seems like what I will need is to be able to store the value at play and then when the rotation would occur just Add or Subtract 90degrees from the axis I want to move along.

Can someone help me figure out how to properly store the local value of a static mesh with a Class Bluescript, the rotation nodes I’ve been looking at all seem to be World or Relative which is derived from the parent.

What (I think) I want is this ObjRotation=(x,y,z) when event happens ObjRotation=(x,y-90,z)

Here’s an image of my current setup.

I will try to explain it as simple as possible, if you don’t understand each step, I will create the BP and post the screens :slight_smile:

  1. In the construction script, make a reference to the HalfBridge1 object and save it’s rotation to a variable
  2. In the timeline, make sure you only create a Node for the y axis (The 3 colors), create 2 nodes, 0 and -90
  3. Then, when the timeline updates, add the timeline-vector + the rotation-vector.

Proftit :smiley:

JohnnyCrazy, thanks for the response! I hadn’t thought about storing a variable in the Construction.

Unfortunately it’s not working because the Arch/StaticMesh ‘Wall400x200’ is incapable of being rotated the way I want it to rotate…(?)

I’m going to repost in a minute with a custom mesh to see if it’s still an issue. But WOW that is frustrating. If i rotate the mesh in the component window the direction I want it changes the X,Y and Z every time.

Worked perfectly with a custom static mesh, thanks for the help!

Glad I could help.

BTW, do you mind sharing the way, how you rotate the static mesh? I’m trying it right now, but I can’t get it working (It spins totaly crazy)

//EDIT:

Nevermind, got it working by using “Set relative Rotation”, was using “Add relative Rotation”

I’ll grab and Image right now, but could you share your setup as well. It sounds as though you ran into the same problem I had.

Here’s the working version.

https://youtube.com/watch?v=d2Ua6ncLcVY

Might be useful. Pay attention to the variable section, and substitute location with rotation.

Also I think you might have better results making the bridge sections Actors. There are more Blueprint actions that operate on Actors than meshes currently.

But don’t you have Problems, when you rotate it twice? Because then, the rotation would begin at 0,0,0 again, since you don’t save it to the variable

So I just found the solution to my Problem and here is the setup:

And it’s working quite fine (Timer is cubic with 0 and 180) (May take a while to load)

http://johnnycrazy.de/public/images/ue4%20rotate.gif