Math + sprite/triangle + orientation

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
var77
Citizen
Posts: 52
Joined: Wed May 02, 2018 1:57 pm

Math + sprite/triangle + orientation

Post by var77 »

Hi everyone i post here an issue that i got with my little test.
I'm pretty sure this can be solved by simple arithmetic that i ain't got.

So i got a sprite (player) that can be moved with keyboard and is oriented
with mouse mouvements. I juste wanted to add two things:

A: wanted to add a sprite (cone) that should have his center on
the circle around the player.

B: wanted to add a triangle that should have a coin on the center
of player (to may interact with it later like for collision).

Also everything should have to rotate together. So i'm not pretty sure
how to handle the cone position x/y, or even the two other coins of
the triangle but guess it's some formula with the angle of the player.

Just add file to help (issue.png is sample of expectation in main.love*).
main.love
(14.48 KiB) Downloaded 103 times
Thanks in advance for any suggestion.

(*can't find a way to add img here with attachments seems buggy ?)
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 46 guests