Add rotation

I’d like to make ghostentity have traced entity rotation and add 90 degrees pitch to it. How?

Current, broken code:
[lua]
GhostEntity:SetAngles(trace.Entity:GetAngles():Right() * 90)
[/lua]

[lua]GhostEntity:SetAngles(trace.Entity:GetAngles() + Angle(90, 0, 0))[/lua]

Does not work like I want.
Its too hard to explain. It’s supposed to work like this: http://imageshack.us/photo/my-images/148/90degreething.jpg/.

Use -90?

You have to localize the angle since this is a global and not a relative angle.

You could also use RotateAroundAngles.

This is what i have now, and it’s still not working right.
[lua]
local vec, ang = WorldToLocal( trace.Entity:GetPos(), trace.Entity:GetAngles() + (Angle(1,0,0) * 90), Vector(0,0,0), Angle(0,0,0) )
GhostEntity:SetPos(vec)
GhostEntity:SetAngles(ang)
[/lua]

Try scraping out the stacker addon, maybe something may help.