Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- b2Vec2 Camera::PositionToWorld(b2Vec2 entityPosition, float depth)
- {
- b2Vec2 worldPos = entityPosition;
- float parallaxFactor = pow(2, -depth);
- worldPos *= parallaxFactor;
- worldPos = _screenOffset - _position;
- return worldPos;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement