ZOO Guest |
Quote
|
2017-05-31 07:56:33 |
|
is there any way to programmatically track the position of the bullet if you use a scene node as an object?
@niko
|
niko Moderator |
Quote
|
2017-05-31 20:09:28 |
|
Hm, since the bullet is the clone, you could search the scene graph for an object with the properties you cloned, like the name. Maybe that's a way?
|
Zoo Guest |
Quote
|
2017-06-01 02:39:40 |
|
Can you provide a quick reference to the API? I would like to investigate and create a tutorial
|
niko Moderator |
Quote
|
2017-06-05 05:26:03 |
|
You could probably use the ccbGetSceneNodeFromName() function to find your bullet clone. And then ccbGetSceneNodeProperty(node, "Position"); for the position. So something like that:
var bullet = ccbGetSceneNodeFromName("nameOfTheBullet"); var position = ccbGetSceneNodeProperty(bullet , "Position");
|