Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- First of all, you have to place the widget 'Minimap_Widget' at your player's widget. This file is located at 'SimpleMinimap/Content/Minimap/Widget'.
- - Create a folder inside your project 'Content' folder called 'Minimap'. This is where you will save the configuration for each map.
- - Iniside 'Minimap' folder create a new blueprint class derived from 'Minimap_Information'. The file name must match the name of the map you want to configure.
- - Open the file created in the previous step and configure the minimap as you wish.
- - OBS:
- - The center of the texture used for the minimap should be the center of the world (0,0)
- - Structures:
- -- Minimap Information
- - Minimap Image: Texture used in minimap.
- - Background color: Background color outside minimap image.
- - Map Size: Map size in centimeters. See 'map_size.bmp'.
- - Initial Map Zoom: Map zoom at creation of widget, can be changed at anytime calling 'SetMapZoom( float Zoom )' function.
- - Rotation Mode:
- - Minimap Rotate - Pawn: The Minimap follows pawn yaw rotation.
- - Minimap Rotate - Pawn's Camera: The Minimap follows the pawn's yaw rotation camera.
- - Icon Rotate - Pawn: The Player icon indicator follows pawn yaw rotation.
- - Icon Rotate - Pawn's Camera: The Player icon indicator the pawn's yaw rotation camera.
- -- FRadarIcon Struct
- - Icon: Icon image.
- - Icon Location: Icon static location.
- - Actor: Follows actor location. Setting this will override Icon Location.
- - Actor Component: Follows an actor component.
- - Icon name: Must be unique, since it will be how you will identify the icon.
- - ZOrder: Icons with larger ZOrder values will draw above icons with smaller ZOrder values.
- -- Icons and map zoom can be changed at anytime using functions in your minimap widget.
- - AddRadarIcon(FRadarIcon Icon);
- - RemoveRadarIcon(FString IconName);
- - SetMapZoom( float Zoom );
- - Updates:
- - Version 1.5:
- - Round Radar: Use a round radar instead of square one.
- - bool GetRadarIcon(FString IconName, FRadarIcon& RadarIcon);
- - bool IconExist(FString IconName);
- - SetIconTexture(FString IconName, class UTexture2D* NewTexture);
- - SetMinimapSize(FVector2D NewSize = FVector2D(300,300));
- - Angle: Relative icon angle.
- - ScaleOverZoom(Curve Float): Scale the icon in relation to the map zoom.
- - KeepOnRadar: The icon will stay on the edge of the map instead of disappearing.
- - bKeepIconAngle: The icon will maintain its angle independent of the radar angle.
- - FollowActorAngle: The icon will follow the rotation of the actor or actor component if set.
- - LifeSpan: Icon life time. If it is greater than zero the icon will automatically be removed at the set time.
Advertisement
Add Comment
Please, Sign In to add comment