Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - urubu

Pages: [1]
1
I have an object3d that is a cube initially set at (0,0,0).
When I invoke getWorldSpaceBounds for this cube I get (0,0,0) and (1,1,1) that I think is the expected result.

I then do a lot of rotations and translation on this cube. Each individual rotation is always 180dg or -180dg around one of the axis so that the cube local coordinate axis are kept parallel to the world axis (the sides of the cube are always parallel to the screen)

I then calculate the size of the sides of the returned bounding box (using the world bounds) using w=maxX-minX, h=maxY-minY, d=maxZ-minZ. I would expect this to always be 1,1,1 and it is most of the time. The problem is that after some rotations/translations I begin to get strange values for w,h,d like 3,2,1.

Am I missing anything?




2
Support / How to identify direction of a swipe (android)
« on: June 04, 2012, 03:47:01 am »
Is it possible to identify the direction of a swipe in relation to an object?
I have attached an image to help clarify what I need. I have a cube and I would like to be able to identify which edge of the cube the swipe move is targeting.
I am currently detecting the 2d coordinates of first and last touch on the screen but I don;t know how to translate that to local coordinates of the cube.
I would think that if I have the two points in local coordinates I could infer the direction of the movement.
Any thoughts?

[attachment deleted by admin]

Pages: [1]