Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Drive 2D overlay movement X or Y

themask
Registered User
Quote
2013-05-23 00:18:48

I have been trying really hard to find a way of moving a 2D overlay node through behaviour, the purpose is to create a `scrolling´ 2D overlay as there is quite a long text to show on screen.

Iam not working on a game, it is an informative application showcasing an event, so I use 2D overlays to display the programme.

Apparently the behaviour "move scene node" doesn´t work from 3D space to 2D, nor does parenting the 2D overlay to a 3D object (which can be moved in X or Y axis).

The closest example of what I am trying to do is from a Copperlicht tutorial:

http://www.ambiera.com/copperlicht/documentation/tutorials/tutorial-04.html

Here the 3D position of a 3D object is translated to the 2D overlay, but I cannot figure out how to create this with code inside CopperCube ( I bought the light version three days ago).

Any help would be greatly appreciated...


niko
Moderator
Quote
2013-05-23 06:10:01

Hi,

with the current behaviors and actions, this isn't possible in CopperCube, but it will be with the addition coming with the next free update (hopefully read next week, or the one after that). See here for details: http://www.ambiera.com/forum.php...


themask
Registered User
Quote
2013-05-23 23:51:06

Thank you very much! these are very good news... I´ll wait for the next update then.


sixvivid
Registered User
Quote
2023-04-18 07:19:05

Hello! I came across this looking for an answer myself. Couldn't find one, but scripted it, this works flawlessly! Just attach it to a behavior you want to induce the action, such as the up arrow key like I have :)

node = ccbGetSceneNodeFromName("textBox");
posY = ccbGetSceneNodeProperty(node, "Pos Y (percent)");

inc = posY + 0.5

ccbSetSceneNodeProperty(node, "Pos Y (percent)", inc);



Create reply:


Posted by: (you are not logged in)


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