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 2741 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 2741 days.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...