Simply adding/Subtracting will shift the wave up/down and it's corresponding operation is (sinx)+1...i'm trying to achieve a shift in the X axis also known as a phase shift which corresponds to sin(x+1)...pure curiosity...^^
I'm not sure you can get phase shift outside of 90 degree angle without using custom nodes. Adding or subtracting a scalar value wouldn't work because you would need to have those values change too during time to match the phase.
Anyway if you wan't to get 90,180,270 shift it's fairly easy. For 180 just use 1-x on sin, for 90 and -90 (270) you do the same just by using cos node. But for fine tuning like 15, 30, maybe by using custom node it would be possible, anyway I couldn't get it to work before with stock ones.
Actually, maybe even 45 angle should be possible with some simple math, this would be the formula in that case, but I would really need to test that on paper to make sure the numbers are correct
Ah crap, I'm sorry I gave you an incomplete piece of advice. Add/minus against the time expression going in to your sine wave.
edit: I understand this is more of a hack than anything, and isn't really shifting the sine wave as it is more of an time offset, but it works and is cheap on instruction count.
Yeah I cracked open UDK because it didn't seem right there was no way to control it, by default the sine wave acts like it has a time node plugged into the right socket, but if you make an actual time node then like imbue says you can just add to it before you feed it in.
That should work, for time node 2Pi is neutral value then right? So the desired angle would just be added as a scalar value in radians before that sine node.
Thanks imbueFX, it's been quite some time since I was messing with that, but I totally missed the part to try and control it before sine node.
Replies
Anyway if you wan't to get 90,180,270 shift it's fairly easy. For 180 just use 1-x on sin, for 90 and -90 (270) you do the same just by using cos node. But for fine tuning like 15, 30, maybe by using custom node it would be possible, anyway I couldn't get it to work before with stock ones.
Actually, maybe even 45 angle should be possible with some simple math, this would be the formula in that case, but I would really need to test that on paper to make sure the numbers are correct
sin (x + 45) = (sin (x) + cos (x)) * sqrt (2) / 2
edit: I understand this is more of a hack than anything, and isn't really shifting the sine wave as it is more of an time offset, but it works and is cheap on instruction count.
Thanks imbueFX, it's been quite some time since I was messing with that, but I totally missed the part to try and control it before sine node.