0

So i'm making an rpg game in xna. I can move my player around the screen, however it can also move off the screen. How can I implament a simple camera that will follow the player and prevent them from moving off of the screen? I only need it to follow, not zoom or rotate or anything like that.

Any responses will be greatly appreciated!

2
Contributors
2
Replies
39
Views
3 Years
Discussion Span
Last Post by CJMW
1

place this script on your camera
transform.position = new Vector3(player.transform.x,y,z)

1

Cheers buddy, actually had this solved for a few days, just forgot about the post! Thanks anyway!

Votes + Comments
hehe cheers
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.