Array along a 3d curve with rotation lock on certain axis i want to do an array of my instance , its a steet lamp that need to follow a road that go up and down ...

so i need an array of my instances and a curve modifier? but the problem is that my Z rotation value keep changing , according to the normal of the curve , and i dont want this because street lamp stay straight even if the road is inclined ... i tried to lock the rotation of my instance and tried to do an Z axis constraint but it dont work , i failed ? , i dont know what to do ...

im also quite confuse about every different way to do an array following a curve , i know we can use a curve modifier , a constraint , modify bezier option in propreties, and even particles ?? im lost here , dont know which technique is best for what ..

thanks
To duplicate an object without deformation and with a constraint on its Z axis, use Dupliframe:


Build your bezier curve, and, in Edit mode, make sure that it goes in the right direction, if not: select all and W > Switch Direction
Put the origin of your bezier curve at it starting point
Put your object at the same point
In the Data menu of your bezier curve, click Path Animation, then in Frames choose the amount of duplications that will happen. Enable Follow.
In the Object menu of the object you want to duplicate, in Duplication, enable Frames and unclick Speed.
Parent your object to your curve with ctrl P > Object.
Keep your object selected and go to Constraints, choose Limit Rotation, and click X and Y, unclick Z.


It should work