playMaker

Author Topic: Building a tank problems.  (Read 2557 times)

SirNikkolas

  • Playmaker Newbie
  • *
  • Posts: 9
Building a tank problems.
« on: March 22, 2012, 03:49:36 PM »
Hi Guys, I've been working with unity only for about two weeks, and playmaker for a few days, but I seem to have hit a snag. I am building a tank where the chasis moves independently from the turret on the top. I've gotten the base moving using the simple tank controller at :

http://www.unifycommunity.com/wiki/index.php?title=SimpleTankController

The turret I got working by making it a child of the chasis, using the "Mouse Look" State, and messing around with a few settings.

Now the problem that I'm having is when i hit the 45 degree angle on the x axis, instead of the tank moving foward, it starts sliding towards the way the turret is facing. If i'm facing any other direction, it works how it's supposed to.

Any help would be welcome :) Thanks

SirNikkolas

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Building a tank problems.
« Reply #1 on: March 22, 2012, 04:49:16 PM »
I don't really understand exactly what I did, but I fixed it. Messed with the "Mouse Look" min and max's.

Some helpful hints:

1) By default the mouse look is inverted. If you change the Y sensitivity from 5 to -5, it will change it so when the mouse looks up, the camera looks up.

2)In "Mouse Look" If you want to be able to rotate all the way around an infinite number of times, the 360 max X and -360 max X can be changed to "None" on each of them. This does not put a limit on the amount of times you can Rotate (in my case the turret).

3) If a child object is being distorted when looking around, put an empty object in between the parent and child. (Parent > empty class > child). After I did this, my turret does not distort when rotating.


Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Building a tank problems.
« Reply #2 on: March 22, 2012, 05:15:02 PM »
Thanks for sharing those tips!