playMaker

Author Topic: Freeze Position of Game Object  (Read 3602 times)

Nog

  • Playmaker Newbie
  • *
  • Posts: 47
Freeze Position of Game Object
« on: July 23, 2015, 06:26:03 PM »
Is it possible to freeze the positions of a game object so that it will only move in the local Z position? I have a game object that follows the player, but I just want the game object to move forward and not side to side. I can freeze the game object in world space using the get and set position actions, but the forward axis of world space changes according to the location of the game object. Changing the get and set positions to self does nothing.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Freeze Position of Game Object
« Reply #1 on: July 24, 2015, 04:22:54 AM »
Hi,
if you add the component "rigidbody" you can use Constraints to freeze positions and rotations,
you can set drag to 0 and disable gravity when needed

Nog

  • Playmaker Newbie
  • *
  • Posts: 47
Re: Freeze Position of Game Object
« Reply #2 on: July 24, 2015, 05:15:58 AM »
Thank you djaydino. I will give that a try.