playMaker

Author Topic: locking axes of first person controller on 2d platform  (Read 1364 times)

perdido007

  • Playmaker Newbie
  • *
  • Posts: 24
    • View Profile
locking axes of first person controller on 2d platform
« on: December 17, 2013, 09:39:09 AM »
Hello, i have a car (seen from side) on a platform and i would like it to move around on the x and y axes, i am using a first person controller but it sometimes drops out of the plane, questions :
1) how do i lock the axes of my first person controller ? ( so that it doesn't move on the z axis ) have tried with rigid body but that is incompatible with first person controller
2) in order for the car ( player ) to move around should i use itween for this ? any pointers ?
thanking in advanceā€¦cheers

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15300
  • Official Playmaker Support
    • View Profile
Re: locking axes of first person controller on 2d platform
« Reply #1 on: December 17, 2013, 11:07:58 AM »
Hi,

 Maybe you should do all this using the new 2d system?

else, I would constantly reposition the z component... a bot of a hack, but that would work. else do your platform collider much wider in the z axis, it may be the problem.

bye,

 Jean

perdido007

  • Playmaker Newbie
  • *
  • Posts: 24
    • View Profile
Re: locking axes of first person controller on 2d platform
« Reply #2 on: December 17, 2013, 12:21:05 PM »
Hello Jean

Thank you for coming back to me, found solution. I was using a first person controller which is for 3d i think so logical that it would move in all axis. Replaced player with Basic controller from 2d platform controller and added a capsule collider and a rigid body, now it moves just along the x and y axis and collides with coins adding score to a gui, which is what i was trying to achieve. The videos from Hutong are a great help, in this case video 7.

Still have to faff around in those itween fsms to come to grasp with them though but am battling it out.

cheers and thanking you again