pointing an object in the right angle
Hi there everyone,
So I've been making some good progress on a game i hope to release soon, but i've come to a problem that i think will require some advanced math that i'm still very noobish on with game salad..
what i'm looking to do is.. have touch event object (a footprint) that i spawn to face at a variable x coordinate across the top of the screen.. that x variable changes frequently..
what i tried to do is each time that X change happens, to stamp that as a "change attribute" and then whenever the foot print is spawned it references the last stamp and would point at that x coordinate..
but i can't seem to figure out how to calculate the right angle to spawn. Any tips, leads or advice would be super appreciated!
Thanks,
Caleb
So I've been making some good progress on a game i hope to release soon, but i've come to a problem that i think will require some advanced math that i'm still very noobish on with game salad..
what i'm looking to do is.. have touch event object (a footprint) that i spawn to face at a variable x coordinate across the top of the screen.. that x variable changes frequently..
what i tried to do is each time that X change happens, to stamp that as a "change attribute" and then whenever the foot print is spawned it references the last stamp and would point at that x coordinate..
but i can't seem to figure out how to calculate the right angle to spawn. Any tips, leads or advice would be super appreciated!
Thanks,
Caleb
Comments
vectortoangle will be found in the functions drop down on the expression editior