Game Development Community

leaving screen

by rennie moffat · in Torque Game Builder · 06/25/2009 (11:57 am) · 2 replies


hi just doing a scroller with my first camera behavior.

I have attached the came behavior (an X Scroll) to my hero class, except the hero leaves the screen pretty quickly, he goes ahead of the shot.

So I have played with the few variables, hero speed, camera min and max X, not quite sure what these are in the code. In the TGB Console it is how far they go. Are these things dependent on each other?

About the author

My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.


#1
06/25/2009 (12:01 pm)
ps.
the camera keeps going, slowly, i guess behind the hero, who is still way ahead of shot.




:?
help, must help.
:?..]
#2
06/25/2009 (12:13 pm)
ok,
so i adjusted this line of script in my cameraMovement.cs file.


sceneWindow2D.setCurrentCameraPosition(%CameraPointX* 0.5, 0);

the 0.5, x I suppose tho no effect on Y axis with the , 0 (y) so not sure there. but....


when integer near 1 hero remains in middle while camera scrolls.
tho he, it, image, shakes.
when set to 0.5 no shaking is seen.


Any thoughts, answers?

thanks
ren