Comments

  • DuesDues Member Posts: 1,159

    Can't see the images attached, but if you have you actor not movable you can try this:

    constrain rotation to self.time * X

  • birdboybirdboy Member Posts: 284
    edited July 2016

    I can see the images but I don't fully understand what you're trying to achieve.

    Do you want the small actor to rotate if it passes through the A and B actors? This should already be happening. Maybe the actor is falling too fast, a rotation speed of 90 is a bit low if it's falling fast because it will only rotate as long as it is colliding with the A and B actors.

  • lucia116lucia116 Member Posts: 20

    @Hoodloc said:
    I can see the images but I don't fully understand what you're trying to achieve.

    Do you want the small actor to rotate if it passes through the A and B actors? This should already be happening. Maybe the actor is falling too fast, a rotation speed of 90 is a bit low if it's falling fast because it will only rotate as long as it is colliding with the A and B actors.

    I want to make a game, such as the ship swaying in the waves.

    For example, like this game
    http://sfa.me/

  • SocksSocks London, UK.Member Posts: 12,822
    edited July 2016

    @lucia116 said:
    I want to make a game, such as the ship swaying in the waves.

    Random swaying, Constrain Rotation to:

    10* sin(game.Time* 100)+10* sin( game.Time* 141)+10* sin( game.Time* 29)+10* sin( game.Time* 87)

    . . . . . . . . . . . . .

    Regular swaying, Constrain Rotation to:

    30* sin( game.Time* 100)

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

    Example file attached:

  • lucia116lucia116 Member Posts: 20

    @Socks said:
    Example file attached:

    @Socks Thank you! It is perfect.

Sign In or Register to comment.