Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Feature requests and bug reports
Bug!

just_in_case
Moderator
Quote
2018-09-08 20:50:46

Disabling/enabling collision via scripting doesn't work.

var s = ccbGetSceneNodeFromName("cubeMesh1");
ccbSetSceneNodeProperty(s, "Collision", false);


this code have to disable the collision for the Cubemesh....but it did not work. also i have physics engine set as physics simulation..


just_in_case
Moderator
Quote
2018-09-09 06:59:20

Also setting the visibility of the scenenode to false is not disabling the collision..


pmax
Registered User
Quote
2018-09-09 13:37:23

if you used this script in the editor you must also add this command "editorUpdateAllWindows()".

only works with old physics management.


just_in_case
Moderator
Quote
2018-09-09 15:41:35

@pmax am not using the script in the editor.. am using it in the game during runtime...

@Niko actually the bug appears when we have physics engine set to physics simulation. the code may be working, but there is problem when the physics simulations is turned on...

even if the object position changes the collision was still there at the old position of the object..... try the ccb file below... execute it as exe and then go near to the 2 cubes using the arrows keys... then press Spacebar to change the position of the cubemesh... you will notice that the there is still collision occuring...

https://drive.google.com/file/d/...


while using the physics engine as collision , will remove the collision from the old position, but disabling the collision during runtime is not working in the collision engine too.


just_in_case
Moderator
Quote
2018-09-09 16:11:03

So, adding every few seconds do something then,executing this
ccbUpdatePhysicsGeometry()
will change the position of collision object... it may solve my problem now..

but there must be an option to turn collision on or off during run time and the above code should be applied automatically when the physics engine is changed to physics simulation instead of collision....


pmax
Registered User
Quote
2018-09-09 21:28:35

try to see if that's okay I added a script in the root.
https://www.dropbox.com/s/9ucyvh...


niko
Moderator
Quote
2018-09-10 07:44:51

Yes, that's true, it is a missing feature.


just_in_case
Moderator
Quote
2018-09-10 15:47:11

@Pmax you should have read my comment, i have already solved that thing ... All i want is turning collision on and off during runtime...
@niko i hope you will make this feature available in the next release...


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Intern?tional" (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