Hello Pelangi,
If you are using 4.15 you could use the “Get cached Geometry” node in combination with the “Local to Viewport” node. I have provided an example below. I hope this information helps.
Example:
Make it a great day