Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I am writing a first person game that requires the player to identify a node (using proximity). Is the anyway a node can be identified in this condition.? |
||||
|
You can check for the property "Type" for a node it will give you the node type, you need to write the javascript code for it. |
||||
|
well if the on proximity is on the node you want to identify you can probably use something like ccbGetSceneNodeProperty(ccbGetCurrentNode(), "Name"); check the js api |
||||
|
thanks for the help. Unfortunately the snippet of code returns the name camera 1 (the current active camera ) i need to identify the node the camera is close to. thanks anyway, I'll keep trying |
||||
|
here's a bit of code that demonstrates how to tell if the camera is beside something: var nodes = ["cubeMesh1", "sphereMesh1", "cylinderMesh1"]; |
||||
|
uhhh that distance check should be if distance <= 30 but you get the idea. ![]() |
|