ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperLicht
forum topic indicator Get Object size
person icon
codemastermike
Registered User
Quote
2011-10-06 09:17:42

Is there a way to get the world size of a object, both a Overlay2DSceneNode (width and height) object and a 3D object (x, y, z)?

You can set the width and height for a Overlay2DSceneNode object, but you cant get it from the object.

person icon
niko
Moderator
Quote
2011-10-06 15:01:40

You get the size of any object in 3D by querying it's bounding box. Use getBoundingBox() of any scene node, or getTransformedBoundingBox() if you prefer the bounding box in global space.

For the Overlay 2D node: You can use the not-documented function getScreenCoordinatesRect() for this, it takes a bool and the renderer as parameter. Use it for example like this: getScreenCoordinatesRect(false, engine.getRenderer());

person icon
codemastermike
Registered User
Quote
2011-10-07 12:08:25

Nice, thanks niko!

person icon
fabri
Registered User
Quote
2012-08-25 18:15:36

Hi,

I'm trying to create a simple demo where with 4 buttons (2D Overlay ditto) up, down, left, right respectively can go forward, backward, turn left, turn right.

I saw the 2D Overlay idem but I can not understand what actions should I use.

Who can help me?

Thank you very much


Create reply:










 

  

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


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |