Control Camera goes crazy on Constrain Actor
mesaticus
Member Posts: 51
So I have my hero character set up with all sorts of movement controls and rules, and I have a control camera attached to the character (think platformer).
So now I'm trying to implement a more custom collider around my hero. I figured I'd make a smaller box, constrain it to the hero, and switch any collision rules from the hero, to the box. I followed this tutorial in a test file and it works perfect...so I moved the code and things I learned to my bigger project.
It's here things go completely wonkey. I noticed the box would start off following the character, and then just accelerate foward and go off the screen. I noticed if I hit jump, the box might stay with the character, but then it'd bounce way off, and again, go forward off the screen. What on earth??
So I started turning off all the rules on the character to troubleshoot, and the problem is the constrain camera? If I turn that off, my new box follows the character perfectly! Any reason why this might be so?
So now I'm trying to implement a more custom collider around my hero. I figured I'd make a smaller box, constrain it to the hero, and switch any collision rules from the hero, to the box. I followed this tutorial in a test file and it works perfect...so I moved the code and things I learned to my bigger project.
It's here things go completely wonkey. I noticed the box would start off following the character, and then just accelerate foward and go off the screen. I noticed if I hit jump, the box might stay with the character, but then it'd bounce way off, and again, go forward off the screen. What on earth??
So I started turning off all the rules on the character to troubleshoot, and the problem is the constrain camera? If I turn that off, my new box follows the character perfectly! Any reason why this might be so?
Comments
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
So I have my non-scrollable HUD on the top most layer so I guess by default things drop into it. I'll add that to my list of things to be careful about.
Thanks!
(Hey Gamesalad. UI suggestion. The ability to lock layers and receive a warning when you try to add stuff to it).