playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
How do I constrain camera position
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: How do I constrain camera position (Read 1635 times)
Skaeren
Playmaker Newbie
Posts: 11
How do I constrain camera position
«
on:
December 09, 2015, 03:10:23 AM »
The app I am making is 2d, and I was wondering how do I constrain the position of the camera, so that user cannot move it beyond, for example, x 7:-7 and y 4:-4.
Logged
Skaeren
Playmaker Newbie
Posts: 11
Re: How do I constrain camera position
«
Reply #1 on:
December 14, 2015, 04:11:54 PM »
Kinda sd to see that there has been no response. Is it not possible to do this?
Logged
phannDOTde
Full Member
Posts: 237
Re: How do I constrain camera position
«
Reply #2 on:
December 14, 2015, 05:02:35 PM »
1. Get Cam position
2. clamp the position floats to the desired min max
3. set Cam position
do that in a loop or at every frame and you have your "hard" cam boundarys
Ps.: I guess there is no Vector clamp so you need to use Vector3 get XYZ and Vector3 Set XYZ and then clamp float on both of your axis
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
How do I constrain camera position