Jump to content

A better way to write a compass script ?


Moore Tone
 Share

You are about to reply to a thread that has been inactive for 3647 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Basically I want to get a hud with a visual compass in it that tell me the angle of the z axis of a given object "A" rezzed iw (both hud and "A"objct are mine, so I have the totall access/control about them).

The problem that puzzles me is that when the hud recieve the rotation value I have to make a bunch of coversions, so I'm wondering if there's a more efficent way to obtain the same result.

my HUD do these steps:

1) convert the string message (from a listen) into a rotation var.
2) covert the rotation var in a vector var (representing the rot in radiants)
3) take the z axis to create a second vector to represent the z rotation on the x axis (my compass is on a hud on my screen)
4) covert the last vector var in a rotation var
5) finally use it to rotate the compass!

so..(string) > rotation > vector > vector > rotation!....is there a shorter way (or a quicker, more efficent way) to obtain the same result instead of make so much conversion to obtain a rotation var from another rotation var?

Thank you.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3647 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...