Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Croesus on April 18, 2021, 03:26:26 PM

Title: Draw path on tiles for TurnBase style movement
Post by: Croesus on April 18, 2021, 03:26:26 PM
Hello everyone. I am making a prototype for a TurnBase game and I achieved these;

- Select a player and enable the tiles that player can move to
- Select a tile and player move there

But for some time I am trying to figure out how can I draw a line when hovering the tiles. Like in the pictures.

Like this:
(https://cdn.vox-cdn.com/thumbor/ZlvoMoy4sSGIrMBHjw0iv5B_44w=/0x0:909x496/1200x0/filters:focal(0x0:909x496):no_upscale()/cdn.vox-cdn.com/uploads/chorus_asset/file/10310631/vQm4BEk.png)

Mine:
https://disk.yandex.com.tr/i/Q2k3cWRUS0I1lA (https://disk.yandex.com.tr/i/Q2k3cWRUS0I1lA)
Title: Re: Draw path on tiles for TurnBase style movement
Post by: Plancksize on April 21, 2021, 03:14:44 PM
You can use a Line render I guess.
If it's just two points you can  use Draw Line action for that. If you need a path you can use Draw Path Line Renderer. (you can find those on Ecosystem)
In any case you'll need to get the Tile to World position of the tiles you want to draw the line on.