camera offset

SORRY I PUT THIS IN THE WRONG FORUM. CAN SOMEONE MOVE IT.
I want the camera to follow an actor but offset so the camera is always focused 150 pixels ahead of the actor.
I have tried doing it by constraining its position and using a hidden actor 150pixels in front to control the camera. It works but it leads to some jerkyness.
Is there a simple way to get the camera to look 150 pixels to the right of the actor its following ?
I want the camera to follow an actor but offset so the camera is always focused 150 pixels ahead of the actor.
I have tried doing it by constraining its position and using a hidden actor 150pixels in front to control the camera. It works but it leads to some jerkyness.
Is there a simple way to get the camera to look 150 pixels to the right of the actor its following ?
This discussion has been closed.
Comments
There should be an offset built into the control camera behavior.
It still shouldn't be jerky in the solution mentioned above. Can someone from Gamesalad look into this? I need this fixed before releasing my game.
Tom
hope that helps, but I am not sure as if you are already doing this and it ain't working for you...
kipper
i found a way to make a smooth offset when the player was going left and right... shifted the camera slightly so, i you're going left, it pushes you off centre right and the opposite when going right.
The real problem is moving up. I'd done this horizontal offset using MOVE TO and setting the horizontal to game.playerX and (+ or -) the most effective value.
but when i try to set the vertical to game.playerY the whole thing is jerking. i expected it to fluidly follow up the way it does L & R.
any ideas what i should try? I did this, rebuilt it many ways with variations, but i feel i must be missing something.
grateful for any insight
thanks
I think I have found the solution here, which is written above, but perhaps being overlooked.
I have had GUNS "attached" to my player character, which have been very jerky while moving around. That is because I was using "Change Attribute" instead of "Constrain Attribute".
I was using "Change Attribute" to set the global attributes "PlayerPositionX" and "PlayerPositoinY" every 0.0001 second. I was then telling my Gun actor to "Change Attribute" to that position every 0.0001 second as well. Not good enough.
Simply using "Constrain Attribute" to set all our your global attributes, such as storing your PlayerPositionX and Y, and then use Contrain Attribute again for telling your Gun to position itself at the PlayerPositionX and Y.
As far as I can tell, "Constrain Attribute" is updated and enforced EVERY SINGLE FRAME, and thus produces smooth results.
If you are using "Change Attribute" with a Timer for situations like this, it will be jerky.
Don't be jerky. Be smooth!
- Hymloe