How to offset the camera without it being all weird and jerky?
ericdg123
Member, PRO Posts: 156
I've searched the forums and found nothing. I want to offset my main actor to the left side of the screen. So I make an invisibile actor and put the control camera in this actor. I then constrain the invisible camera actor to my main actors position plus 100 or so.
The problem is it makes my main actor super jerky and strange.
I've noticed this problem when constraining other actors positions too, but just putting the actor that the other actors are constrained to in the layer before the constrained actors it works ok.
It sucks becuse all my constrained actors such as wheels or whatever have to be in front of the actor they are constrained too, but it does work this way.
However trying this with the camera thing still does not work. I know it's possible but I just cant figure it out. Thanks.
The problem is it makes my main actor super jerky and strange.
I've noticed this problem when constraining other actors positions too, but just putting the actor that the other actors are constrained to in the layer before the constrained actors it works ok.
It sucks becuse all my constrained actors such as wheels or whatever have to be in front of the actor they are constrained too, but it does work this way.
However trying this with the camera thing still does not work. I know it's possible but I just cant figure it out. Thanks.
Comments
:-)
By the way, I asked what the inner box was for, a couple of weeks ago: it's the camera area, I realise now...doh!
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
I tried your suggestion, same thing happens. I'm also trying to figure out how to make it work when the player rotates. The constrained actor does not stay to the front of the actor.
Another consideration which will cause problems anyhow though, is collision. Enough said there...
Of course, the ideal would be to be able to move the camera's origin as you know; but when or even if that's going to happen, I don't know. Sorry I can't be more helpful here. I could upload the tests, but as I say, until the collision problem is sorted, I think it's not worth proceeding with that style anyhow. Sorry to be so negative; hope I'm wrong...
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
To move the actor I'm using accelerate on a button and left and right buttons rotating clockwise and counter clockwise.
Edit: At the moment, i've abandoned the constrain and just made the actor smaller. Not a great solution...
This should be a simple thing to do really. Just want enough space in front of the player at all angles...
As for my previous post, I've "shot myself in the foot"! This is exactly what Eric is doing, and I see why now. I live and learn!
One thing I would say, Eric, is constraining attributes is extremely processor intensive, as each one is constantly checking. So if you've quite a few, that's the reason for your game's jerkiness. So I guess your solution would be to somehow reduce the amount of constraints.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
I do have tons of constrains but this is not the problem as I'm still getting a good frame rate and I always check to see how much processor power every constrain pulls. When I put the camera controller in the main actor everything is as smooth as creamy peanut butter, but as soon as I put the camera control in a camera actor and constrain it, it turns to chunky peanut butter.
mmmmmmm, peanut butter.