Mini map compass.
klickink
Member Posts: 35
in Help Wanted
Okay guys so I want to make a mini map with an arrow that is always pointing towards one object (at a time) does anyone have something I could follow? or just what might be some advice in helping me create this. Thanks in advance.
Comments
never created a minimap.
But I think you'd want to draw your own custom arrow and have it point to the right (as 0 degrees is facing directly right in GameSalad).
Then use vectorToAngle(object.x - hero.x, object.y - hero.y) function to get angle from your hero to your object. and rotate the arrow to this angle and place it on your minimap (maybe an image not sure how you're making your map) scaled down from your actual hero's position (since your minimap might be a 1:10 scale of your actual map/scene).
This may or may not be of use to you but it is a simple mini map demo: http://forums.gamesalad.com/discussion/comment/436556/#Comment_436556.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User