Question on collisions...

BlueFanStudiosBlueFanStudios Member Posts: 77
edited November -1 in Working with GS (Mac)
Hi, I'm fairly new to GameSalad and I have a question about the collision behavior.

I'm creating a game with gravity and i need a floor, problem is that when using the collision behavior it automatically bounces and i don't want that.

Basically, in this game, objects move across and the screen and you need to flick them off the screen. I have followed the throwing an object tutorial and it works while the object is stationary, however if the object is moving across the screen then the flicking will no longer work. If i use the velocity function instead of move then it works but then the gravity cause the items to bounce and move along the screen at different rates.

Sorry, there are a lot of questions in there. If anyone can help it would be greatly appreciated.

Comments

  • StusAppsStusApps Member, PRO Posts: 1,352
    Couple of things I guess. First would be to avoid using the gravity function. It is better to add an accelerate at angle 270 to any actor you want affected by gravity. That way you can control when this occurs by an attribute if you wish.

    The collision can also be dependent on an attribute too. So for example, if you have something that switches on once the actor has been touched (ie a self boolean attribute called touched that changes to true when it's been flicked). That way you could make a rule that the actor only collides with the floor if 'touched=false' so when its been flicked it'll pass straight through the object.

    Hope that makes sense.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    BlueFanStudios said:
    Hi, I'm fairly new to GameSalad and I have a question about the collision behavior.

    I'm creating a game with gravity and i need a floor, problem is that when using the collision behavior it automatically bounces and i don't want that.

    Basically, in this game, objects move across and the screen and you need to flick them off the screen. I have followed the throwing an object tutorial and it works while the object is stationary, however if the object is moving across the screen then the flicking will no longer work. If i use the velocity function instead of move then it works but then the gravity cause the items to bounce and move along the screen at different rates.

    Sorry, there are a lot of questions in there. If anyone can help it would be greatly appreciated.

    Also, bounciness is called "restitution" Look in the physics settings for each actor. 0 = no bounce, 1= bounce height equals drop height, 2=bounce height greater than drop height. It's a real attribute so you can choose any decimal value between 0 and 2.
Sign In or Register to comment.