angle spawn actor

mozoomozoo Member Posts: 19
edited May 2012 in Working with GS (Mac)
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!

Best Answer

  • MotherHooseMotherHoose Posts: 2,456
    edited May 2012 Accepted Answer
    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

    image MH

Answers

  • MotherHooseMotherHoose Member Posts: 2,456
    Open GS > splashScreen > New … and in Search field type: collision angle
    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

    image MH
  • mozoomozoo Member Posts: 19
    thanks! but you know if its possible to take the collision angle if the actor is the same?
  • mozoomozoo Member Posts: 19
    where i can find the attribute angleOfimpact?
  • mozoomozoo Member Posts: 19
    thank you very much!!! you help me a lot ;)
Sign In or Register to comment.