Page 1 of 1

How can i set 3d bounds to character?

Posted: Mon Aug 26, 2013 11:02 am
by zaquanishak
Hi coolbloke1324 ,

From the example 9.4-goto-iso-tiles, i see how u enable the 3d bounds for the character using .size3d() and .isometric(), but i couldnt do the same when i try for multiplayer. I add the .size3d() and .isometric() when the character is init. Can u please tell me how to do it?

Regards,
Zachz

Re: How can i set 3d bounds to character?

Posted: Mon Aug 26, 2013 1:33 pm
by coolbloke1324
Hey ya,

You are probably better off taking a look at one of the multiplayer examples to base any code off.

Multiplayer game classes are written in slightly different ways which you should study from the multiplayer examples.

I'm sitting in an Apple store at the moment trying to get a mac repaired so my answers might be a bit short right now :)

Re: How can i set 3d bounds to character?

Posted: Tue Aug 27, 2013 2:20 am
by zaquanishak
Well none of the multiplayer examples show me how to enable 3dbounds for multiplayer. Can u please help me out?

Regards,
Zachz

Re: How can i set 3d bounds to character?

Posted: Tue Aug 27, 2013 5:20 pm
by coolbloke1324
Hey ya,

Example 24.5 uses multiplayer and isometric.

Could you explain a little more what you want to do? In that example you can see 3d bounds working to correctly depth-sort an isometric entitiy. That is all 3d bounds are used for.

Are you trying to achieve something else other than isometric depth sorting?

All the best,

Rob

Re: How can i set 3d bounds to character?

Posted: Wed Aug 28, 2013 2:23 am
by zaquanishak
Thanks Rob,
What im trying to do is to enable the drawBounds for the character. I set the drawBounds to true in entity(character) but was unable to make it visible. But i manage to make it visible when i set the drawBounds to true in Viewports. So can u explain to it works? do i need to set drawBounds to true for every sceneGraph or i only do it in Viewport to see the drawBounds?

Regards,
Zachz

Re: How can i set 3d bounds to character?

Posted: Wed Sep 04, 2013 6:23 pm
by coolbloke1324
The viewport acts as the drawing system for a scene so it is in charge of drawing bounds. This means you can think of the viewport's drawBounds(true) as a "global" draw bounds. Then you can individually set the drawBounds(false) or (true) of any entity in the scene to cherry-pick which ones have bounds drawn or not.

If you do not set drawBounds(true) on the viewport, it will not matter what the entity's settings are as they are never checked.