Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Rotate Camera Target

dmans420
Registered User
Quote
2019-12-19 17:18:54

Sup guys, I've been working on a Shoot Em Up game (its like Starfox in gameplay, constantly fly straight along z and move about the screen along x and y.)
The movement itself is scripted, and one of the things I have been able to do is rotate the model by a set amount for the rocket fighter when you pan left or right or move up or down. So for instance flying upwards will rotate the model up along the x axis until it equals around 20 degrees, and then stop rotating. It does this separate for all directions, giving the illusion of a dynamically flying craft, rather than one that just pans around the horizon.
I've considered pulling the cam into a first person perspective, however in order to make it feel more badass I want the camera to rotate with the model, so that you actually feel like your sitting in the cockpit moving with the craft.
I can move the cam and target thru scripting something like
ccbSetSceneNodeProperty(Cam, "Target", CamPos.x, CamPos.y, CamPos.z - 10);

Now what I'd like to know is, is it possible to manipulate the camera target's rotation, thru script, so that the in game perspective is also rotated? BTW making the cam a child the model does nothing good. What I'm hoping for is a scripted method.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Int?rnational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact