Actor flipped upside down when moving from right to left.

Hi,
I have been going through some tutorials and managed to build a game that has a fixed object that shoots at flying obstacles moving from right to left.
I have 2 types of obstacles - A & B which was timed at 2.5 to spawn. I am trying to spawn it for a certain period and increase in speed depending on the level.

After splitting the timer between obstacle A&B, the obstacles are moving from right to left. However, it seems to be flipped upside down when it is spawned.

Obstacle A has
move
in direction - 180 relative to scene in additive way
at speed - 50

Controller has
if game.playing - true

do
-timerA -every 2.5
spawn actor-A
in direction - 180 relative to scene
from position - self.position.x, random(self.position.y,275) relative to scene

-timerb -every 3
spawn actor-B
in direction - 180 relative to scene
from position - self.position.x, random(self.position.y,275) relative to scene

Can anyone suggest where I can change to fix this upside down error?

Suggestions on any tutorials on timer/per level would be helpful too.

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2014

    You're rotating your actor by 180° in the spawner - so your actor will be spawned upside down.

    Didn't you try any other values ? If I find I am not getting the result I expected and I don't know why, the first thing I'd do would be to play about with the relevant values . . .

    So you have an actor that appears upside down - and you have a couple of angles going on (one in the actor and one in the spawner) - the obvious thing would be to change these angles and see what happens ?

    GameSalad should really rename the 'Direction' field in the spawner to 'Rotation'.

  • damon380damon380 Member Posts: 7

    Hi Socks,
    Thanks for your input. As you mentioned, it is showing direction and I felt that it represented that it is moving to the left and didnt know that it behaves as rotation.

    I have changed it to 0 and it works now.

    :)

  • SocksSocks London, UK.Member Posts: 12,822

    @damon380 said:
    I felt that it represented that it is moving to the left

    The spawner has no influence on the actor it is spawning beyond where in the scene it spawns the actor and the actor's rotation at 'birth' - the spawner is dumb in that it doesn't impart any information like size or movement direction or speed or colour . . . . etc.

  • TosanuTosanu Member, PRO Posts: 388

    @Socks said:
    the spawner is dumb in that it doesn't impart any information like size or movement direction or speed or colour . . . . etc.

    Yeah, the only trick i've found around that is to impart a bunch of self assets on the spawner that attach to global assets at the moment of spawning, and then use THOSE to impart rules on the spawned creature.

Sign In or Register to comment.