How to make a coin actor toss and spin to drop on the floor?

I'm trying to make my enemy spawn a coin upon killed and then it will toss, bounce just like in real life.

However, when I use the 'rotate' behaviour my coin will always fly out of the screen.

I didn't set any gravity.

Can somebody explain to me why is it like this?

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Set the rotation to relative to scene rather than relative to actor.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • winged_boxwinged_box Member Posts: 52

    @tatiang said:
    Set the rotation to relative to scene rather than relative to actor.

    It still fly out of my screen.

    i don't understand why!!!

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Post a screenshot of your rules and maybe we can spot something that isn't right.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • winged_boxwinged_box Member Posts: 52
    edited April 2014

    @tatiang said:
    Post a screenshot of your rules and maybe we can spot something that isn't right.

    I thought 'Rotate' could help me create a coin tossing effect, turn out my understanding of the behaviour is wrong. It is use to make the actor move in a circular direction in the scene and not "Rotate" it at it's origin.

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

    @winged_box said:
    I thought 'Rotate' could help me create a coin tossing effect, turn out my understanding of the behaviour is wrong. It is use to make the actor move in a circular direction in the scene and not "Rotate" it at it's origin.

    Rotate rotates the coin about its origin, the reason it is moving in a circular path is that you have another rules (a rule you are not showing us) that is also effecting the coin's movement.

    It's likely you have a Move/Move To/Accelerate behaviour with the 'Relative To:' part set to 'Actor' ?

    Like @tatiang says, if you post your rules then someone might be able to help you out, without at least a screenshot of the rules controlling the coin it'll just be a long and dreary guessing game. Lol :smiley:

  • winged_boxwinged_box Member Posts: 52

    Alright, I got a bit lazy preparing the screenshot but here it is.

    image

    Yes Socks, I removed the other movement behaviour and 'Rotate' indeed rotates actor in it's origin. And I do have 'Accelerate' and increase velocity behaviour to create the jump and fall effect.

    The moment when I add in 'Rotate' it will just fly outside the screen.

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

    @winged_box said:
    The moment when I add in 'Rotate' it will just fly outside the screen.

    . . .

    @tatiang said:
    Set the rotation to relative to scene rather than relative to actor</font color>.

    . . .

    @Socks said:
    Rotate rotates the coin about its origin, the reason it is moving in a circular path is that > you have another rules (a rule you are not showing us) that is also effecting the coin's
    movement.

    >

    It's likely you have a Move/Move To/Accelerate behaviour with the 'Relative To:' part set to 'Actor' ?</font color>

    :)

  • winged_boxwinged_box Member Posts: 52

    IT'S WORKING!!!

    Thank you Socks and Tatiang.

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934

    You could also just use an animation instead of wasting processing power on physics for an actor that really doesn't need physics.

Sign In or Register to comment.