Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
3D compass pointing North

veganpete
Registered User
Quote
2020-06-02 13:59:33

I've made a 3D cylindar and squashed it down on the "y" axis to make a flat circle. I then added a compass texture to the htin outer-edge of the cylinder to make it look like a navigational compass. I now want it to point north by adding an instruction such as the following:

"every few seconds do something>rotate object>etc.."

I'm half way there but can't think how get it to work properly. Could I add another 3D item (as a magnetic pole) outside of my map in the far distance and get the compass to point towards it?

Thank you!


count2rfeit
Guest
Quote
2020-06-03 18:47:01

building a compass is not easy anyway you do it. if you use another item as magnetic north - if it doesn't move, the compass won't move. when you rotate around a scene, it is the camera target that changes - so you would have to set the compass to change as the camera target changes...and make the compass rotate according to that change. You can do that with Java Scripts...

You can use invisible walls outside and around your scene (N,S,E,W) and use "when cursor moved over do something" and have it change the rotation of the compass according to which wall you are facing....

just a couple ways, but anyway to do it, it isn't easy... good luck and hope you can figure it out.


douwe
Guest
Quote
2020-08-11 13:59:10

maybe this helps for your compas app

Android Compass by Azim Zahir

https://www.codeproject.com/Arti...


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internati?nal" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact