how to spawn at ends of actor?
Cowuniverse
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
-
mhedges Raised on VCS Posts: 634
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
...
I had the spawn actor set to relative to actor instead of scene. It works now.