playMaker

Author Topic: changing rigid bodies constraints while game is going  (Read 1131 times)

alejandrorobledomejia

  • Playmaker Newbie
  • *
  • Posts: 5
    • View Profile
changing rigid bodies constraints while game is going
« on: July 14, 2015, 07:42:20 PM »
Hi guys hows it going?

Im working on a 3d side scrolling game. Its similar to limbo but the environment is all in 3d. Although my environment is 3d my characters rigid body is only allowed to move on the X and Y position. At this point in my game, my character is walking through a thin rope and I want to have obstacles swinging back and forth on the z axis. When my player is hit by this obstacles he obviously wont move nor do anything because he is not allowed to move on the z axis. The problem is that when I allow the rigid body of my character to move on the z axis and he is barely touched by my obstacles, he is no longer on the position that would be most suited for the rest of the obstacles in the scene. Would there be a way to un freeze his z position just for this set of obstacles then as soon as he passes the obstacles use a (set position) and freeze the z position to ensure that my character is on the exact position within the x axis for the rest of the game?

Thanks in advance!