constant motion for actor

Hello! I need some help.

I created an actor that moves at a constant speed. When it collides with another moving actor it slows down. I need it to move constantly, even if it collides with other movable actors

I have found a tutorial for elevators , were the second actor copies the motion of the elevator when it touches the top surface of the elevator.

Is there another way? Because I need this to work on every side of the elevator , not only the surface.

I have an idea to adapt the elevator concept but I think it's to complex. When the second actor is 1 pixel away from the first actor, I boost the speed of the first actor, so that when it hits the second actor the resulting speed will be reduced to the initial one (or if it hits it from behind I will decrease the speed in order to get the resulting speed equal to the initial speed)

Comments

  • bufteabuftea Member Posts: 43

    I think I have a solution, but I m not sure. I need your advice please!

    I've set the density for the first actor to 1000000 and the second actor has the density set to 0. It works! Can GameSalad handle such heavy objects without glitches to your knowledge?

    I'll probably have 3 to 12 heavy objects onscreen at the same time , which will just pass through and then get destroyed outside the screen

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

    @buftea said:
    Can GameSalad handle such heavy objects without glitches to your knowledge?

    Actors have no weight, it's all just numbers, and GameSalad can handle numbers just fine ! :)

  • bufteabuftea Member Posts: 43

    thanks for the info :) I was stuck on this problem for almost a week . I can move on now

Sign In or Register to comment.