≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Point light cast no shadow?
Posted by:
(you are not logged in)
Enter the missing letter in: "I?ternational"
(you are not logged in)
Text:
[quote][b][/b] wrote: You did a a great efforts ! I've tried your code, and i can see some minor errors that might be due to the case sensitivity, so: 1. Always make sure what is your object name in the editor 2. Use the Properties as it appears exactly so 'Direction' not 'direction' :) I've re-modified your script so that you may give it a try. [code] var sun = ccbGetSceneNodeFromName("Sun"); var Direction = ccbGetSceneNodeProperty(sun, "Direction"); Direction.x += 0.01; if(Direction.x <= 1.0) { Direction.x += 0.01 } else if (Direction.x > 1.0) { Direction.x = -0.2 } ccbSetSceneNodeProperty(sun, "Direction", Direction.x, Direction.y, Direction.z); print(Direction.x); [/code] Hints : - As you did before always use print to follow variables and statuses. You can also use the alert command only in the editor. - Always variables are case sensitive in JavaScript - You can use the Notepad++ editor and adapt it under language menu to show JavaScript format this will be very helpful *blinzel*[/quote]
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