Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] Camera pointing the wrong way.

Author
Message
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 28th Feb 2019 17:58
Good evening . I could use a bit of help. When I play my game it works fine apart from when I finish a level on the new level the camera points the same way as it did when finishing the first level . How do I tell it to point forward in the new level instead of left or right or back to front. I look forward to your replies .

The author of this post has marked a post as an answer.

Go to answer

puzzler2018
User Banned
Posted: 28th Feb 2019 18:03
I would remember the cameras angles before the whole game starts

RememberCameraX#=getcameraanglex(1)
RememberCameraY#=getcameraangley(1)
RememberCameraZ#=getcameraangleZ(1)

do
Start each Level with the Camera angle set to those that we remembered.. RememberCameraX#, RememberCameraY#, RememberCamerZ#
sync
loop

Or create the level with starting position of the camera and angle for every level been at 0,0,0

SetCameraPosition ( 1, 0, 0, 0)
SetCameraAngle (1, 0, 0, 0)

Others may know a trick or 5 too.


Tier 1 Developer
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 28th Feb 2019 18:34
Sorry tried that and the problem is there is no command setcameraangle. Getcameraangley(1) works fine . Maybe rotatecamera will work . Brb
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 28th Feb 2019 18:37
Got it setcamerarotation. Thanks
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 28th Feb 2019 20:18
This post has been marked by the post author as the answer.
The answer to this is
setcamerarotation(1,0,0,0)
Points the camera due north on the map.
Thanks for the reply puzzler you pointed me in the right direction.

Login to post a reply

Server time is: 2024-11-23 05:09:54
Your offset time is: 2024-11-23 05:09:54