First of all: welcome to the forum
!
Could you explain your problem in more detail? For instance, is the compass 2D or 3D? Do you want to animate the compass so that when you move the mainview, the compass points to the north
relative to the current orientation? If so, you need to update the orientation of the compass all the time, based on the current orientation. If you can explain what you are trying to accomplish more clearly, we can help you better.
It would also be helpful if you could post some sample code that everyone can run without any extra models, so you could replace the compass model that you use with the arrow.wrl model that is included in the Vizard installation. Also wrap your code in code tags (select the text in your post that is code and click the hashdeck sign). It will make your code much more readable for all of us.