Not movable = NO overlaps or collide event?

fmarkusfmarkus Member Posts: 42
edited November -1 in Working with GS (Mac)
Hello,
Just wanted to make sure... I don't know if it is a bug I have yet... but it seems that I can't get an overlap or collide event between two objects if they have their physics settings to movable. Is that right? And if I have to keep the movable option, how do I prevent objects to not use gravity?
Thanks for the help.

Comments

  • synthesissynthesis Member Posts: 1,693
    Movable attributes are relative to camera movements I believe. So if you have a scrolling scene...the object will move with the camera if movable is checked...if unchecked...it will remain stationary...like a heads up display or a joystick.

    This is better controlled within layers.

    I think the movable setting would be irrelevant to a collision behavior.

    Am I right on this....ANYBODY?
  • fmarkusfmarkus Member Posts: 42
    I have just made the test again:
    Create two objects. Make both NOT movable. overlap them in the scene. On any of them create a rule:
    Actor receives event 'overlaps or collides' with actor of type "your other actor".
    Action: Destroy this actor.
    Run this.
    Actor does not get destroyed...
    If you make one movable, the object will be destroyed. Very easy to reproduce.
    So, I don't mind this rule as long as I can prevent gravity to influence these objects :(
  • fmarkusfmarkus Member Posts: 42
    Anyone?
  • nulonulo Member Posts: 315
    if the moveable is off, the actor wont be influenced by gravity, by any move-like behavior and by any physical influence (an object colliding with it, and pushing it)
    the moveable option has nothing to do with collisions.

    for example. you would use the moveable off on actors for walls and grounds (actors that collide with other actors, but need to stay always on the same position)

    * now i cant figure out why you would want two actors to collide with each other and get destroyed if they are supposed to NOT move. if they don't move, they should never collide in the first place, right?
  • fmarkusfmarkus Member Posts: 42
    The destroy part is an example to show collision checks does not work if the two objects are set as not movable. And since I can not find another way to have objects not influence by gravity my system does not work.
    My question then is simple: Is there any other way to make objects not movable by gravity but still have collisions tested???
  • rebumprebump Member Posts: 1,058
    Turn gravity for the scene off and then have a downward acceleration added to any objects that you want affected by gravity. I hear that is the way most are doing it.
  • fmarkusfmarkus Member Posts: 42
    but then do not get the right physics reactions, do you?
  • rebumprebump Member Posts: 1,058
    I would think you would still. Anything at rest will have zero velocity values. Anything falling would have a manual gravity acceleration that you applied.

    Not sure with objects at rest that you then slam into or cause an explosion near. In those instances, I think the movement would still occur but maybe exaggerated due to the lack of scene gravity with no eventual fall. So maybe you could, if velocity is not zero, perform some vector calculation between it's current velocity and the downward (manual) gravity acceleration to get the original scene gravity effect.

    I'm not on my Mac but I think some of the movement behaviors even have a "stacked" versus "additive" setting...not sure if that is just the "move" ones or if it includes "accelerate". If it is there, I would think "additive" would handle the vectoring for you.

    I haven't done any real gravity stuff myself. Just puttered around a bit here and there and also read a lot of posts here in the forums on the topic. Hopefully some others can chime in. Also, trial-n-error! :-)
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Downward velocity will not work. What you want is a downward acceleration. This is all I use anymore. It is way easier to make individual things fall this way than to try and keep things from falling when using scene gravity. For example sometimes you may want a platform that does not fall but moves back and forth. You can't just uncheck movable as it wont go back and forth. With scene gravity on there are ways to keep it from falling, such as constraining y velocity, but constraining is processor intensive and in my experience it has made collision detection much worse. When scene gravity is 0 it is easy to make a moving platform that does not fall. Just don't give it a downward acceleration and set it's density very high so that it is not bumped much by the jumper and set its rotation to fixed. Then use change velocity or move rules as it shows in the wiki to get it to move the way you want.
  • fmarkusfmarkus Member Posts: 42
    I will try that tonight! Thanks guys!
  • ValanValan Member, BASIC Posts: 410
    Are you testing a situation that will never arise by itself?

    Two objects that are non movable will not interact in any way by themselves since neither can alter their initial position.

    I use unmovable actors as identical replacements for actors who have finished moving and rotating. They still interact with other movable actors i.e. they make a sound when hit by other actors.

    You could constrain the y position so it seems unaffected by gravity.
  • jhaasjhaas Member Posts: 233
    I use non movable collision all the time - I used it in my Pocket Putt Game. Of course in this game there is no gravity to deal with. Scitunes is right - using a acceleration behavior on the object that is moving is better than gravity.

    I just did a quick test and I was able to destroy a non movable object. Of course it was hit by a movable object. :)
  • fmarkusfmarkus Member Posts: 42
    Yes that case works. If you want to be able to have objects collidable and NOT be affected by gravity though (And that's what 'not movable' does), you have to make them movable, set gravity to 0 and you have to fake gravity through a down acceleration for all the other objects. Feels weird, more like a hack to solve a bug to me but it works.
Sign In or Register to comment.