I was looking for exactly this, couldn't find it so I ended up writing my own. Posting it here for future people looking for help:
First I created an pair of real attributes, initialX and initialY (which I usually do anyway) and have:
Change attribute (CA): self.initialX to self.position.X CA: self.initialY to self.position.Y
Constrain Attribute: self.position.Y to 5*sin(self.Time*100%360)+initial.Y
I also change the rotation of the object to 90 (I imported it sideways) and then have:
Constrain Attribute: self.Rotation to 90-(2*sin(self.Time*100%360)
The reason I chose 90 is that the rotation attribute can be weird if you're going under 90 and then back above, which causes your actor to spin around instead of wavering back and forth a few degrees.
The number 5 in front of the sin expression determines the magnitude. In this case, the object is literally hovering + or - 5 from its initial position Y, and it's rotating between 2 degrees from it's centered position. Finally, changing the 100 factor determines how fast this happens. I ended up going with 200 in my final use.
Comments
First I created an pair of real attributes, initialX and initialY (which I usually do anyway) and have:
Change attribute (CA): self.initialX to self.position.X
CA: self.initialY to self.position.Y
Constrain Attribute: self.position.Y to 5*sin(self.Time*100%360)+initial.Y
I also change the rotation of the object to 90 (I imported it sideways) and then have:
Constrain Attribute: self.Rotation to 90-(2*sin(self.Time*100%360)
The reason I chose 90 is that the rotation attribute can be weird if you're going under 90 and then back above, which causes your actor to spin around instead of wavering back and forth a few degrees.
The number 5 in front of the sin expression determines the magnitude. In this case, the object is literally hovering + or - 5 from its initial position Y, and it's rotating between 2 degrees from it's centered position. Finally, changing the 100 factor determines how fast this happens. I ended up going with 200 in my final use.
Hope it helps.