Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Question about extending a script...

santito
Registered User
Quote
2016-06-09 04:38:32

I am interested in using the script named ccbSetSceneNodePositionWithoutCollision from the CopperCube JavaScript reference page. This script is like this:
var s = ccbGetSceneNodeFromName("cubeMesh1");
ccbSetSceneNodePositionWithoutCollision(s, -22.097015, 9.848448, -40.738777);

I have read the script's description and I understand what it is for and what it does exactly. What I want to know if it would be possible to extend this script further by adding the action "Move Animated" along with the "Time to move (ms)". So, can it be done?


aiming_bullet
Guest
Quote
2016-06-09 06:09:44

You can do same with action...
Change position of a scene node...
And use move animated .... Instead of ccbsetscenenodposition...

You can use.....

CcbgetSceneNodeProperties...
And disable collide with world behaviour...


aiming_bullet
Guest
Quote
2016-06-09 06:12:20

You can do same with action...
Change position of a scene node...
And use move animated .... Instead of ccbsetscenenodposition...

You can use...

CcbgetSceneNodebyName
CcbgetSceneNodeProperties...
CcbsetSceneNodeProperties..

And disable collide with world behaviour...

And on reaching that position ... Enable the collide with world behaviour ...
By using the set and get scene node properties javascript...

Hope that works....


santito
Registered User
Quote
2016-06-09 18:38:22

I appreciate your help and suggestions aiming_bullet, but what I really just want to do is to just use the ccbSetSceneNodePositionWithoutCollision script since it already has the particular function that I am looking for, which is movement through solid objects. Now, just as I already mentioned, I would like to complete this script by adding to it (if possible) the "Move Animated" and the "Time to move (ms)" actions, all of this in the same script in actual JavaScript code.

Let me put this in a more graphical way. Take a look at the picture below:

🔎︎


You see where the red arrow is pointing at the two actions, Move Animated and Time to move (ms)? Well, I would like to have the JavaScript code to those two actions integrated in the ccbSetSceneNodePositionWithoutCollision, that's all.

@niko: I would really appreciate it if you could give me any opinion or suggestions on this. Thank you very much.


Create reply:


Posted by: (you are not logged in)


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