Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I'm trying to adjust the Z position and orientation of a node when combined with "ccbGet3DPosFrom2DPos". Basic setup is a Camera with a "shoot" behavior. It does shoot the node "bullet" from the object "followMouse". BUT the 3d position of the "followMouse" object is linked to the FarPlane of the Camera. Is it possible to adjust the z position of the followMouse without changing the cameras farplane? Any clue on this would be great - thanks all.
|
||||
|
you can use ccbSetSceneNodeProperty(anode, "Position", pos3d.x, pos3d.y,pos3d.z);now you can feed your own desired value to any of the axis. you can use the .x and .y coming from your mouse position and can feed a different value for the .z position. hope that helps. |
||||
|
@just_in_case thanks - this did some of a trick. I tried your solution. It's kinda working; but now the mouse.Pos in relation to the follower is completely off axes when not dead center at 0,0,0. The further away from center point, the more distorted/offset it gets. Any clue how to compensate the offaxes shift? Many thanks, this is driving me nuts :) |
||||
|
It's hard to say, what you are trying to acheive and what probelm you are facing with the code, maybe you can explain in a bit detail what you want to do with the mouse and camera far plane. |
|