Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Track position of bullet

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");



Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "In?ernational" (you are not logged in)


Text:

 

  

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