This is somewhat hard to explain, but I'm trying to figure out how I can trigger an event after the player has traveled a full 360 degrees around a stationary object. Illustration below:
gyazo.com/9066f4d8442160063ce8a3efa591558c
Any ideas?
create invisible spokes radiating out from your stationary object that can then be crossed and checked off a list/total count ?
Have the object, or a hidden one point to the player every tick then check the angle of the object.
Develop games in your browser. Powerful, performant & highly capable.
If you calculate the signed difference of the angle of the objects every tick and add that to a variable you can get the total degrees moved around the center object.
signed angle difference of b to a = angle(0,0,cos(b-a),sin(b-a))
Example showing the total degrees moved around the center object.
https://dl.dropboxusercontent.com/u/5426011/examples21/signed_anglediff_sum.capx
R0J0hound
Yeah i was gonna say that but i had something in my eye..
-below-
If you calculate the signed difference of the angle of the objects every tick and add that to a variable you can get the total degrees moved around the center object. signed angle difference of b to a = angle(0,0,cos(b-a),sin(b-a)) Example showing the total degrees moved around the center object. https://dl.dropboxusercontent.com/u/5426011/examples21/signed_anglediff_sum.capx
This worked perfectly! Thanks a million.