Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
how to turn of gravity on\off by code |
||||
|
its not possible unfortunately but you can of course turn off gravity whenever you like.... You can also make use of the code that sets a position without collision - pretty sure no gravity in that case...so I make use of that and the normal situation to get around some gravity issues. |
||||
|
Var root = ccbGetSceneNodeFromName("root") ; ccbSetSceneNodeProperty(root, "Gravity", value) ; https://www.ambiera.com/coppercube/doc/cnt_javascriptref.htmlccbRegisterOnFrameEvent |
||||
|
thanks robo could u pls answer to my other 2 questions pls if u know the answer. |
||||
|
sorry - just realised the coder is: var root = ccbGetRootSceneNode(); ccbSetSceneNodeProperty(root, "Gravity", value); |
|