how to spawn at ends of actor?

CowuniverseCowuniverse Member, PRO Posts: 97

There is a black rectangle that is rotating and I want to make it so when I touch the screen it spawns an actor on both of the short ends facing the same direction. I tried putting the self.rotation in the direction for spawning the actor but it doesn't spawn in the same direction.

Best Answer

  • mhedgesmhedges Raised on VCS Posts: 634
    Accepted Answer

    Two ways - the easy and the sublime.

    Easy - constraining x, y, and rotation, destroy the existing actor and spawn one with the original dimensions plus two squares on each small rectangle end.

    Sublime - constraining x, y and rotation, spawn two actors orbiting the original one. For this you will need sin and cos - search for threads on "orbit".

Answers

  • CowuniverseCowuniverse Member, PRO Posts: 97

  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2015

    ...

  • CowuniverseCowuniverse Member, PRO Posts: 97

    @mhedges said:
    Two ways - the easy and the sublime.

    Easy - constraining x, y, and rotation, destroy the existing actor and spawn one with the original dimensions plus two squares on each small rectangle end.

    Sublime - constraining x, y and rotation, spawn two actors orbiting the original one. For this you will need sin and cos - search for threads on "orbit".

    I had the spawn actor set to relative to actor instead of scene. It works now.

Sign In or Register to comment.