Coordinate system in my 3D App World is Strange.....or am I missing something?

16 views
Skip to first unread message

AFlynt

unread,
Feb 9, 2011, 4:42:32 PM2/9/11
to Kaneva 3D Apps
Hello everyone,

I am new in this Google group.
In my 3D app, I have a tile placed at X: -17.2 Y: 0 Z: -6.2 using
this code:

kgp.objectgenerate(objectid(tile), -17.2, 0, -6.2, 1, 0, 0)

It shows up just fine. I would like to place an object directly above
the tile. So I thought just do this:

kgp.objectgenerate(objectid(thing i want above the tile), -17.2, 4,
-6.2, 1, 0, 0)

The object to place appears at the coordinates I used in the code per
the X,Y, and Z indicators in build mode, but the object is not
floating above the tile. It is far away from the tile. Any help would
be appreciated. Thanks.

Bryan Hickerson

unread,
Feb 9, 2011, 5:10:00 PM2/9/11
to kaneva-...@googlegroups.com
How far is is far away? If you want something right above your tile you want something like (-17.2, 0.1, -6.2).

Clifford Hattingh

unread,
Feb 9, 2011, 5:12:48 PM2/9/11
to kaneva-...@googlegroups.com
Is it a user-made item? If so, could it be that the origin of the item that you moving is not set to the center of its mesh? 
(basically, when your moving the item in build-mode, is the green/red/blue arrows on the item in its center?)

Yanfeng Chen

unread,
Feb 9, 2011, 6:49:28 PM2/9/11
to kaneva-...@googlegroups.com
Looks like the second object is not centered properly. The pivot point might be way off from the object itself.

AFlynt

unread,
Feb 10, 2011, 10:28:47 AM2/10/11
to Kaneva 3D Apps
I am making my objects in Sketch-up 8 free edition. How do I make the
pivot point at the center of the object?

On Feb 9, 6:49 pm, Yanfeng Chen <yanfe...@gmail.com> wrote:
> Looks like the second object is not centered properly. The pivot point might
> be way off from the object itself.
>
> On Wed, Feb 9, 2011 at 5:12 PM, Clifford Hattingh <neotan...@gmail.com>wrote:
>
> > Is it a user-made item? If so, could it be that the origin of the item that
> > you moving is not set to the center of its mesh?
> > (basically, when your moving the item in build-mode, is the green/red/blue
> > arrows on the item in its center?)
>
> > On Thu, Feb 10, 2011 at 12:10 AM, Bryan Hickerson <brya...@gmail.com>wrote:
>
> >> How far is is far away? If you want something right above your tile you
> >> want something like (-17.2, 0.1, -6.2).
>

Bryan Hickerson

unread,
Feb 10, 2011, 11:30:03 AM2/10/11
to kaneva-...@googlegroups.com
Put the middle of the object at the intersection of the three axes.

AFlynt

unread,
Feb 10, 2011, 12:11:01 PM2/10/11
to Kaneva 3D Apps
Thanks. I created the objects starting at the center of my Sketchup
universe.

On Feb 10, 11:30 am, Bryan Hickerson <brya...@gmail.com> wrote:
> Put the middle of the object at the intersection of the three axes.
>

Yanfeng Chen

unread,
Feb 10, 2011, 1:46:26 PM2/10/11
to kaneva-...@googlegroups.com
If you don't mind, can you tell us the item global ID (the first parameter you passed to objectGenerate API)?

AFlynt

unread,
Feb 10, 2011, 1:59:07 PM2/10/11
to Kaneva 3D Apps
3617277

On Feb 10, 1:46 pm, Yanfeng Chen <yanfe...@gmail.com> wrote:
> If you don't mind, can you tell us the item global ID (the first parameter
> you passed to objectGenerate API)?
>

Yanfeng Chen

unread,
Feb 13, 2011, 11:13:05 AM2/13/11
to kaneva-...@googlegroups.com
CheckerBoardTile

Isn't it the tile object you mentioned? What's the other one with the offset?

AFlynt

unread,
Feb 15, 2011, 4:24:01 PM2/15/11
to Kaneva 3D Apps

3619079

On Feb 13, 11:13 am, Yanfeng Chen <yanfe...@gmail.com> wrote:
> CheckerBoardTile
>
> Isn't it the tile object you mentioned? What's the other one with the
> offset?
>

Yanfeng Chen

unread,
Feb 26, 2011, 12:20:18 PM2/26/11
to kaneva-...@googlegroups.com
It appears OK, other than the pivot point is at one side of the object.

Unfortunately I don't know what happened. Based on your code, the 'glowing plank' should float 4ft above the checker board. Note that Kaneva uses natural units. 4ft is ~70% height of your avatar.

You might want to remove all other code from your app and only keep two objectGenerate calls and see if it still happens.

What's the name of your app? Is it accessible from Internet?
Reply all
Reply to author
Forward
0 new messages