Movement settings through code

DamienDamien Member Posts: 8
edited November -1 in Tech Support
I am having problems with turning my objects "Physics>Movement" parameter on and off through code when the game is running. Starting with the object moving, I want it to stop when it gets to a certain point, without using collision.

The parameter changes to false correctly, but the object keeps moving.

Thoughts? Thanks,
:Damien

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    does it work to change the linear motion of the actor instead of changing the movement variable? Seems like you should be able to change it to zero. Just a thought
  • DamienDamien Member Posts: 8
    I see the way you are thinking... what I failed to mention (dah) is that I am using gravity. With gravity, there is no linear movement in the vertical (strangely maybe).

    So that leaves me with, if you can change variables through code, but nothing happens when it should, is this a bug?

    Cheers,
    :D
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    The movement option was meant for before the game starts settings for things that should never move.

    Once it gets to a spot, I think you can use a Change Velocity to 0 speed.
    To counteract gravity, add an acceleration in the opposite direction.
Sign In or Register to comment.