Compass target arrow isnt functioning

Followed tutorial step by step and done the red arrow corresponding to player’s movements.
But failing to have the green arrow that would point to the target. It always points to the north (and the red arrow just moves according to the player’s movements as it is supposed to be)

I guess some setting in those UP Axe/Tracking Axe should be done?
The cube “sucher” is parented to the Character in Vertex mode
Nadel is green/red arrow

The idea is simple - when the red arrow and the green arrow point to the same direction - the player should move that direction

you can take a look at this test i made a while back, it has a working compass.

http://15b.dk/blendfiles/randomleveltest.blend

1 Like

thank you. but as far as i can see your compass doesnt include 2 arrows. only 1 for navigating. but i am thinking also on the second arrow that would point at some target and a player has to move around till he finds the direction where 2 arrows coincide

are you sure it is a compass you are looking for ?.
what you are describing does not sound like a compass.

1 Like

Here is what i am working on. You can see 2 arrows on the compass and they should show the same direction in order to go to the target (but in this videofragment these arrows show 2 correct directions, that is wrong)

heres a link to the hud section of my template. scroll down a bit to the compass section. line 118.

thats way to complex, but if you just look at the ST_Active it should help give an idea how i track objects

1 Like

that is not a compass ,you should look up what a compass is.
what you got there is some sort of tracking.

1 Like

thanks a lot. Wow it iseems i should copy all the lines 118-151?
I still hope for the easier solution. As you see on the screenshot, i have a cube -tracker (“sucher”) that acts like sensor and i set all the settings and code according to the tutorial. but in the tutorial there are no sub-categories “Time”. 3D, “Up axis”, 'Track axis" (because of the older version). So i guess something should be set up in these settings, but so far i have no idea what to type there, so i just leave them default

if you dont know code ill extract the important stuff and make useful demo

1 Like

could you please do that? but do you also possibly see the mistake in my code?

its not on different scenes, but it will work all the same
Compass.blend (591.9 KB)

1 Like

thanks a lot! I changed the names of objects to my names. Should i remove the line
scene = owner.scene

and insert these lines if I have 6th number for Main scene:
scenelist=bge.logic.getSceneList()
selscene=scenelist[6]

?

that should work. never used that many overlays before

1 Like

Could you please have a look, i reproduced the same scene, but still not working :frowning:
compasnotworking.blend (1.5 MB)

fixed you tracking setup.

http://15b.dk/blendfiles/compasnotworking-fixed.blend

1 Like

thank you very much. but why is cube in the center moving too?

just delete it , its there to visualize the rotation of the empty.

1 Like

and what should i change if the arrow is at HUD scene, that i use as overlay, and the target is on the Main Scene?

i have updated the compasnotworking-fixed.blend re-download it from above post to get the changes.

1 Like

thank you. that solves my problem!