angle spawn actor
Hi mark first of all thanks! you have reason this is to hard for my level, but i think this is not exactly my problem i think... i will try to explain it better
I have two circles. When i drag one of them and collide with the other one a new actor (animation) is spawned. The problem is that the direction of the spawning have to be the same angle of collision between balls.
For example. If you check this link, in this case the direction angle of spawned actor have to be 144.06 degree.
http://arcade.gamesalad.com/game/3218
Thanks!
I have two circles. When i drag one of them and collide with the other one a new actor (animation) is spawned. The problem is that the direction of the spawning have to be the same angle of collision between balls.
For example. If you check this link, in this case the direction angle of spawned actor have to be 144.06 degree.
http://arcade.gamesalad.com/game/3218
Thanks!
Best Answer
-
MotherHoose Posts: 2,456
in each of the balls … angleOfImpact is:
… an added selfAttribute in the attributePane (on the left of actor you are working in)
on the same actorInstances … the collision angle would be different at each collision
… so the angleOfImpact would change for each/every collisionEvent
MH
Answers
it seems to take forever … but you do get access to that project file!
in your scenario have the redActor change a gameAttribute (Angle type) to self.angleOfImpact
add to spawnedActor a 1st behavior to change (angle or vectorTo) to that gameAttribute