≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
adjust Z pos after setting ccbGet3DPosFrom2DPos
Posted by:
(you are not logged in)
Enter the missing letter in: "Intern?tional"
(you are not logged in)
Text:
[quote][b]Chris[/b] wrote: 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. [code] function onFrameDrawing() { var mouseX = ccbGetMousePosX(); var mouseY = ccbGetMousePosY(); var anode = ccbGetSceneNodeFromName("followMouse"); //ccbSetSceneNodePositionWithoutCollision(anode, mouseX, mouseY, -50); //ccbSetSceneNodePositionWithoutCollision(anode, mouseX, mouseY, -50); var pos3d = ccbGet3DPosFrom2DPos(mouseX, mouseY); ccbSetSceneNodeProperty(anode, "Position", pos3d); } ccbRegisterOnFrameEvent(onFrameDrawing); [/code][/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact