Log in or register to post comments

Positioning problem

May 29, 2013 - 2:35pm #1

So I'm trying to make a simple ball and goal using a single image target.  I added 2 empty gameobjects as children of the target, one called "shootfrom" the other called "targetpos".


The target/goal is not a child of the target, it's just randomly out in the world until the target is tracked and the goal is moved to the targetpos gameobject's position/rotation.


That part works fine, they both spawn and position correctly, but the goal remains tied to the position of the target as I rotate it, where I need it to stay in the same world position regardless of whether the target with the ball is rotated to aim...Right now the target remains straight in front and you can't miss...


I only set the goal's position when the target is tracked, and it's not in an update() so I don't know why it stays in the same spot when the card moves, I guess the world position is moving with the card? I have WORLD CENTER MODE set to AUTO. So I guess that makes sense, but when I set it to NONE it didn't work properly...Applying the same force/velocity the ball would move based on the camera/phone position rather than the specified velocity.


Any advice? When the target is tracked I want the goal and ball to reset to their positions, then I'd like the ball/target to rotate independently of the goal... 


I've tried unparenting things from the card to no avail as well. Any advice? Thanks.

Log in or register to post comments