playMaker

Author Topic: [Solved] What Event for Restricting Axis?  (Read 2764 times)

Shizane

  • Junior Playmaker
  • **
  • Posts: 52
[Solved] What Event for Restricting Axis?
« on: December 03, 2012, 08:20:46 AM »
Hi guys,

I'm using a car movement script for controlling a truck and I have my camera setup to follow the truck beside it. The car moves with WSAD. Only I want to restrict the movement of the truck to move on the Z axis only (forward and backward). What event would I use to so the truck can't turn left and right? I was playing with Set Position but that didn't seem to get the results.

I can constrain the X in the Rigidbody but the truck will still rotate a bit causing it to eventually just stop.

*EDIT - Ah nevermind I got this :) I just froze the position of the X and the rotation on the Y in the rigidbody and that worked.

Cheers!
Shane
« Last Edit: December 04, 2012, 08:14:46 AM by TouchTiltGames »

Vink

  • Playmaker Newbie
  • *
  • Posts: 19
Re: What Event for Restricting Axis?
« Reply #1 on: December 04, 2012, 05:10:53 AM »
Hi i don't entirely know what you mean, but when i practiced with a sidescroller game i restricted the movement thru rigidbody constraints in the inspector, i hope this helps

shinodan

  • Full Member
  • ***
  • Posts: 180
    • Shinozone
Re: What Event for Restricting Axis?
« Reply #2 on: December 04, 2012, 06:55:18 AM »
Hey just to say if your problem is solved add a little tag to the title like [Solved]
Helps admins and people that want to help know whats what!

Vink

  • Playmaker Newbie
  • *
  • Posts: 19
Re: What Event for Restricting Axis?
« Reply #3 on: December 04, 2012, 07:52:54 AM »
Hey just to say if your problem is solved add a little tag to the title like [Solved]
Helps admins and people that want to help know whats what!

Thanks for telling me, im new to forums  :-\