His most notable spell was with Sturm Graz between 1994 and 2002, during which he helped the club winning the Austrian Bundesliga two consecutive times in 1998 and 1999, as well as winning the Austrian Cup in 1996, 1997 and 1999. With the club, he also played in the group stages of the UEFA Champions League in the 1998/1999 and 1999/2000 seasons of the competition.
He left Sturm for a one-season spell with Japanese club Nagoya Grampus Eight, after which he returned to Austria to spend two seasons with Austria Vienna before joining LASK Linz in the summer of 2005. He performed well for LASK in the Erste Liga, the Austrian second division, and was the top goalscorer of the league in two consecutive seasons, scoring a total of 42 goals in 62 league appearances between 2005 and 2007. After helping LASK winning promotion to the Austrian Bundesliga in 2007, he went on to help the club finish sixth in the 2007/2008 Austrian Bundesliga season and himself finished the season as the club's top goalscorer in the league, having netted 13 goals in 32 appearances. Vastić announced his retirement on 18 May 2009, quitting professional football by 30 June 2009.
Vastić became an Austrian national in 1996 and subsequently started to play for the Austrian national team. By 2005, Vastić had won a total of 46 caps and scored 12 goals as an Austrian international. He then disappeared from the team for a period before making a spectacular comeback in 2008, being a surprise selection in the Euro 2008 squad and scoring Austria's first ever goal in the European Championship, also becoming the oldest goalscorer in the history of the tournament.
Vastić's first appearance at a major tournament with Austria was at the 1998 FIFA World Cup finals in France, where he appeared in all of the team's three group matches and scored a last-minute equaliser in their second match at the tournament, a 1–1 draw against Chile. The Austrians were, however, eliminated from the tournament in the first round after recording two draws and one defeat.
On 24 April 2008, Vastić was surprisingly added to Austria's preliminary squad for the UEFA Euro 2008 finals co-hosted by Austria and Switzerland in June. His last appearance for the national team prior to the call-up had more than two and a half years before, on 17 August 2005 in their 2–2 draw in a friendly match against Scotland. He then made his international comeback, winning his 47th cap, as a substitute in Austria's friendly match against Nigeria on 27 May 2008 and was eventually added to their final 23-man squad for the Euro 2008 finals, where he was the oldest player. In Austria's next friendly match three days later, he scored the team's fourth goal in their 5–1 victory over Malta.
On 8 June, Vastić made his Euro 2008 bow in the 1–0 defeat to his native Croatia, replacing Jürgen Säumel in the 61st minute.
On 12 June, Vastić appeared in Austria's second match of the tournament, a 1–1 draw with Poland, winning his 50th international cap as he replaced captain Andreas Ivanschitz in the 64th minute. In the match, he scored Austria's first goal in the final tournaments of the UEFA European Championship by netting an injury-time penalty to equalise, also becoming the oldest goalscorer of the European Championship finals at age 7009122139360000000♠38 years, 257 days, over four years older than Nené who held the record since 1984. Vastic is also the only Austrian player to score at a European Championship and World Cup.
He changed to Austria Wien Amateurs in summer 2010 and was promoted to manager of the first team of Austria Wien in December 2011. He was sacked on 21 May 2012 and his contract won't be renewed when it finishes at the end of May.
Vastić is for more than 20 years married to his wife Anni. Together they have three children. His oldest son Toni also became professional footballer and is currently signed to Austrian Bundesliga side SV Ried.