Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Code not working (probably typed it wrong)

j9907
Registered User
Quote
2019-01-29 01:43:48

My goal is to allow players to go from a third person view to a first person one. I thought this would work:


var char = ccbGetSceneNodeFromName ("Character");

var fpscam = ccbGetSceneNodeFromName ("fpscam");

var pos = ccbGetSceneNodeProperty (char, "Position");


ccbSetActiveCamera("fpscam")

ccbSetSceneNodeProperty (fpscam, "Position", + pos);


But it doesn't seem to! Any ideas?


ishmaru
Guest
Quote
2019-01-29 04:27:19

Well you have a "+" operator for no reason


j9907
Registered User
Quote
2019-01-29 07:10:20

LOL... shoot. I thought that was needed :) Though even without it, it doesn't work


ishmaru
Guest
Quote
2019-01-29 21:31:54

Try removing quotes from setActiveCamera("fpscam")


j9907
Registered User
Quote
2019-01-30 00:11:13

ishmaru wrote:
Try removing quotes from setActiveCamera("fpscam")



Aha! That worked!


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "?nternational" (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